Hi everyone!
I'm trying to build a very small and simple script that will SetDammage anything that comes close to it. Very useful for fires or just to annoy the others!! ;D
I've placed a GameLogic with in it's Init field [This] Exec "Dammage.sqs"
And the script looks like this:
_Obj = _This Select 0
#Loop
? (_Obj Distance Logic1 < 10) : _Obj SetDammage 1
goto "Loop"
And it does not work! Any idea why? BTW, if I change "_Obj" for the name of the player that walks or drives close to "Logic1", then it works. How could I make ANY units or vehicles or objects get the dammage when they get close to the Logic?
And even better, how could I make the "SetDammage" command to set only a few dammage to the object every 1 second for example? I tried this but it doesn't work:
_Obj = _This Select 0
#Loop
? (_Obj Distance Logic1 < 10) : _Obj SetDammage 0.2
~1
goto "Loop"
Any ideas?
Many Thanx in advance!