Main Page | Recent changes | Edit this page | Page history

Printable version | Disclaimers | Privacy policy

Not logged in
Log in | Help
 

Eliminate player self-damage

From EDukeWiki

The following code can be used to make it so that actors (including players) do not take damage from their own weapons. To function, the code should be placed in the actor code (in the block of code beginning with ACTOR ACTORNAME) above the place in the code where the command ifhitweapon is used. It assumes that the gamevar TEMP has been declared.

getactor[THISACTOR].htextra TEMP
ifvarg TEMP 0 // if the actor is set to take some damage from a weapon...
 {
  getactor[THISACTOR].htowner TEMP // gets the owner of the weapon into TEMP
  ifvarvare TEMP THISACTOR // if the owner of the weapon IS this actor
   setactor[THISACTOR].htextra 0 // set the damage to 0
 }

Retrieved from "http://localhost../../../e/l/i/Eliminate_player_self-damage.html"

This page has been accessed 151 times. This page was last modified 11:11, 24 September 2006 by EDukeWiki user LordMisfit. Based on work by Dan.


[Main Page]
Main Page
Recent changes
Random page
EDuke32.com

Edit this page
Discuss this page
Page history
What links here
Related changes

Special pages
Bug reports