Jump to content
Sign in to follow this  
MortenL

Question regarding conditions and deactivations in trigger

Recommended Posts

Hey guys

I need to make my trigger so when my player(name: s1) sits down, he won't take any damage, but when he stands up he will be able to take damage again.

So i wanted to keep it simple and make a trigger, now, aparently a trigger is not as dynamic as i thought.

I used the condition:

s1 setunitpos "MIDDLE";

Activation:

s1 allowdamage false;

Doesn't work.

Now, if you guys know how to get it to work, what if i write s1 allowdamage true; on the deactivation box, will it then disable each time the s1 player changes position to either UP or DOWN ?

Noob question i know, but i need to know how to tackle these kinds of triggers since i face them too often.

Share this post


Link to post
Share on other sites

setunitpos is a statement that tell your unit to do something, not a condition. Use unitpos instead, that asks for the position.

It wont make your unit sit down though. Unit position are standing/kneeling/proning/auto.

Share this post


Link to post
Share on other sites
setunitpos is a statement that tell your unit to do something, not a condition. Use unitpos instead, that asks for the position.

It wont make your unit sit down though. Unit position are standing/kneeling/proning/auto.

tried that (forgot to mention)

says "missing ;"

Share this post


Link to post
Share on other sites

Well that depends on how you tried it. The condition would be something like unitpos s1 == "middle". That would still only react to when you're kneeling, not sitting.

Share this post


Link to post
Share on other sites
Well that depends on how you tried it. The condition would be something like unitpos s1 == "middle". That would still only react to when you're kneeling, not sitting.

-Trigger-

Repeatedly

Condition:

unitpos s1 == "middle"

Activation:

s1 allowdamage false

Deactivation

s1 allowdamage true

----

Doesn't work ? :/

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  

×