Home   Help Search Login Register  

Author Topic: +0.1 dammage  (Read 1389 times)

0 Members and 1 Guest are viewing this topic.

silent1

  • Guest
+0.1 dammage
« on: 21 Sep 2002, 17:38:29 »
  Can anyone tell me how I can add 0.1 damage to a unit over and over, just like a weapon does? I know I would have to set the amount of times to Repeated in a trigger but beyond that I'm completely lost. Any help would be appreciated.

Gameer_77

  • Guest
Re:+0.1 dammage
« Reply #1 on: 21 Sep 2002, 18:19:20 »
To add 0.1 damage to a unit:

Unitname setdammage (getdammage unitname) +0.1

 8)PEACE

_hammy_

  • Guest
Re:+0.1 dammage
« Reply #2 on: 21 Sep 2002, 18:40:32 »
i thought it was

this setdammage 0.1

silent1

  • Guest
Re:+0.1 dammage
« Reply #3 on: 21 Sep 2002, 19:30:10 »
   Thanks Gameer_77. And Hammy - the setdammage command does exactly that - set the damage of a unit to whatever number you want between 0-1. I wanted it to ADD 0.1 damage to a unit, not to SET it to 0.1.
 
   Anyway, I was looking for more of a general command, I want any unit to get + 0.1 damage.  Any ideas? Thanks for your replies everyone.

Bremmer

  • Guest
Re:+0.1 dammage
« Reply #4 on: 21 Sep 2002, 19:53:48 »
You could use a script like this:


;adddammage.sqs
_unit = _this select 0
#loop
~1
_dammage = getdammage _unit
_unit setdammage (_dammage + 0.1)
? (alive _unit) : goto "loop"
exit


Call te script using [unitname] exec "adddammage.sqs"
You can adjust the loop delay (~1) to speed up or slow down the rate dammage is accumulated. You might also want to make a get-out clause in the that will allow the loop to end when the unit isn't dead (depends what you need the script for). You could do this simply be adding another line:

? exitloop : exit

then when you want the hurt to stop just make the variable exitloop = true.

Cheers

silent1

  • Guest
Re:+0.1 dammage
« Reply #5 on: 21 Sep 2002, 22:21:05 »
   Thanks, that helps a lot.