Ifgotweaponce: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
One (talk | contribs)
No edit summary
Fox (talk | contribs)
No edit summary
Line 1: Line 1:
'''ifgotweaponce''' <number>
'''ifgotweaponce''' <number>


True only if a player already has a weapon AND the game is in coop mode.
This seems to work along with [[addweapon]] in cooperative mode. Once [[addweapon]] command is used in an actor, [[ifgotweapononce]] will return a value of zero whenever used in an actor of the same picnum.
 
Example:
useractor notenemy FIRSTGUNSPRITE
  ifgotweaponce 0
    break
  addweapon PISTOL_WEAPON PISTOLAMOUNT
enda


[[Category:Duke3D 1.3/1.5 commands]]
[[Category:Duke3D 1.3/1.5 commands]]
[[Category:Player manipulation]]
[[Category:Player manipulation]]
[[Category:If conditions]]
[[Category:If conditions]]

Revision as of 10:43, 17 October 2009

ifgotweaponce <number>

This seems to work along with addweapon in cooperative mode. Once addweapon command is used in an actor, ifgotweapononce will return a value of zero whenever used in an actor of the same picnum.

Example:

useractor notenemy FIRSTGUNSPRITE
  ifgotweaponce 0
    break
  addweapon PISTOL_WEAPON PISTOLAMOUNT
enda