Weaponswitch: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
mNo edit summary
No edit summary
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Weaponswitch exists for both player and userdef structure members. The player structure controls whenever the action will be made, while the userdef controls the options selected in the menu.
[[bitfield]]
[[bitfield]]


Line 5: Line 7:
2 = switch away when out of ammo
2 = switch away when out of ammo


Setting the gamevar to any non-zero value to disable weapon switching.
4 = modifier for bit 1: only switch on pickup if the picked-up weapon is ranked higher in the favorite weapon hierarchy using the [[command line options|-u]] parameter or [[Configuration file options#WeaponChoice0-9|WeaponChoice0-9]] in the configuration file.
 
Setting the variable to zero will disable all automatic weapon switching.


Example:
Example:


  setuserdef[THISACTOR].weaponswitch -1
  setplayer[THISACTOR].weaponswitch 0


[[Category:Bitfields]]
[[Category:Bitfields]]
[[Category:Userdef structure members]]

Latest revision as of 21:09, 26 August 2012

Weaponswitch exists for both player and userdef structure members. The player structure controls whenever the action will be made, while the userdef controls the options selected in the menu.

bitfield

1 = switch to weapon on pickup

2 = switch away when out of ammo

4 = modifier for bit 1: only switch on pickup if the picked-up weapon is ranked higher in the favorite weapon hierarchy using the -u parameter or WeaponChoice0-9 in the configuration file.

Setting the variable to zero will disable all automatic weapon switching.

Example:

setplayer[THISACTOR].weaponswitch 0