Ifgotweaponce

From EDukeWiki
Revision as of 14:26, 2 December 2012 by Helixhorned (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

ifgotweaponce <number>

This seems to work along with addweapon in cooperative mode. Once addweapon command is used in an actor, ifgotweaponce will return a value of zero whenever used in an actor of the same picnum.
The test always fails (i.e. "returns false") in single player mode.

Example:

useractor notenemy FIRSTGUNSPRITE
  ifgotweaponce 0
    break
  addweapon PISTOL_WEAPON PISTOLAMOUNT
enda