Jump to content
Sign in to follow this  
AdirB

Random 'SetDamage' for unit.

Recommended Posts

Hello,

I've been trying to create a random 'SetDamage' for a unit while entering a trigger, but without success.

Someone told me to put this in the init of a unit but it didn't worked:

_soldier1 setDamage Random 1;

Please, someone may help me with that?

Share this post


Link to post
Share on other sites

 

Init field of unit:

this setDamage Random 1;

Thank you for the answer!

I don't to need to give variables to the "Random"?

Share this post


Link to post
Share on other sites

Thank you for the answer!

I don't to need to give variables to the "Random"?

 

random refers to the number following the command, "this" refers to the unit.

_soldier1 would be a local variable that doesn't exist in the units init field, except you're defining it with _soldier1 = this.

It's nonsensical though since you can already use "this".

 

Some reading stuff to clear things up (or add to the confusion, heh).

 

Cheers

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×