EVENT LASTWEAPON: Difference between revisions
Jump to navigation
Jump to search
Created page with "Selects the last used weapon, stored in the last_used_weapon structure. == RETURN gamevar == {{Template:Weapkey}}" |
Doom64hunter (talk | contribs) mNo edit summary |
||
Line 1: | Line 1: | ||
{{EventTable|1=EVENT_LASTWEAPON|2=player that executed the input|3=[[i|player->i]]|4=1 value}} | |||
This event is executed when the last used weapon is selected, stored in the [[last_used_weapon]] structure. | |||
== RETURN gamevar == | == RETURN gamevar == | ||
{{Template:Weapkey}} | {{Template:Weapkey}} |
Revision as of 12:47, 4 February 2022
Event ID | player# | THISACTOR | RETURN | |
---|---|---|---|---|
EVENT_LASTWEAPON | player that executed the input | player->i | 1 value |
This event is executed when the last used weapon is selected, stored in the last_used_weapon structure.
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 |