EVENT PREVIOUSWEAPON: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
No edit summary
mNo edit summary
 
(7 intermediate revisions by 6 users not shown)
Line 1: Line 1:
This event is called when the player take the previous weapon he have ( default key is " ; " ). See also [[EVENT_NEXTWEAPON]].
{{EventTable|1=EVENT_PREVIOUSWEAPON|2=player that executed the input|3=[[i|player->i]]|4=1 value}}
EVENT_PREVIOUSWEAPON is a [[EDuke32_event_list|Game Event]].


Gamevar RETURN doesn't correctly show the value of the selected weapon. But setting gamevar RETURN to certain value will determine what weapon will be choosen, including Mighty Foot which normaly isn't selected by this command.
This [[event]] is called when the player takes the previous weapon he has ( default key is " ; " ). See also [[EVENT_NEXTWEAPON]].
 
[[RETURN]] is set to 10 by default.
 
== RETURN gamevar ==
 
{{Template:Weapkey}}
 
[[Category:Events]]

Latest revision as of 12:45, 4 February 2022

Event ID player# THISACTOR RETURN
EVENT_PREVIOUSWEAPON player that executed the input player->i 1 value

EVENT_PREVIOUSWEAPON is a Game Event.

This event is called when the player takes the previous weapon he has ( default key is " ; " ). See also EVENT_NEXTWEAPON.

RETURN is set to 10 by default.

RETURN gamevar

Gamevar RETURN holds the key being pressed, instead of the ID of the weapon being selected. Setting gamevar RETURN to a certain value will force the chosen weapon to be selected.

The following values are valid:

RETURN Weapon Event
0 KNEE_WEAPON EVENT_WEAPKEY1
1 PISTOL_WEAPON EVENT_WEAPKEY2
2 SHOTGUN_WEAPON EVENT_WEAPKEY3
3 CHAINGUN_WEAPON EVENT_WEAPKEY4
4 RPG_WEAPON EVENT_WEAPKEY5
5 HANDBOMB_WEAPON
HANDREMOTE_WEAPON
EVENT_WEAPKEY6
6 SHRINKER_WEAPON
GROW_WEAPON
EVENT_WEAPKEY7
7 DEVISTATOR_WEAPON EVENT_WEAPKEY8
8 TRIPBOMB_WEAPON EVENT_WEAPKEY9
9 FREEZE_WEAPON EVENT_WEAPKEY10
10 Previous weapon EVENT_PREVIOUSWEAPON
11 Next weapon EVENT_NEXTWEAPON
12 Weapon that share the same key EVENT_ALTWEAPON
13 last_used_weapon EVENT_LASTWEAPON