Weaponswitch

From EDukeWiki
Jump to navigation Jump to search

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