Jump to content
Sign in to follow this  
Bremmer

Editing problem with @ and ||

Recommended Posts

Hello

I just came across a problem with the editor, trying to use a combination of @ and OR. If this problem is well known then please forgive me for bringing it up again.

Basically the OR in a condition line such as :

@ (condition1 or condition2)

is not recognised correctly, and is interpreted as an AND instead.

Any feedback would be greatly appreciated.

Thanks

Ian

Share this post


Link to post
Share on other sites

here's what i tried

trigger #1:

radius=0, Alpha Radio, repeatedly., condition=this, activation=condA=!condA

trigger #2:

radius=0, Charlie Radio, repeatedly., condition=this, activation=condB=!condB

both condA and condB were intialized as false from the beginning.

then i wrote a simple script.

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">#dd

gg domove getmarkerpos "jj"

@(condA or condB)

gg stop true

goto "dd"

exit

<span id='postcolor'>

gg=name of a soldier,

jj=name of a marker where soldier runs to

when i execute this in player initialization field, gg runs across me to the marker position "jj" when i press 0-0-1 or 0-0-3, he stops running.

so i think it works... hope this helps sad.gif

Share this post


Link to post
Share on other sites

Thanks Ralph

Your right! It appears that @ is sensitive to whether the variables are undeclared. The only other time I've needed to declare variables false at the beginning is when checking for a not condition type. ie.

cond1 - not declared

not cond1 = false

cond1 = false

I wonder why having some ambiguity in one of the OR terms (by not declaring them) causes the command to fail ?

Thanks again

Ian

Share this post


Link to post
Share on other sites

I am sure this has been discussed before (I remmember Kegetys participated in the discussion) - but I am unable to find it (it is likely it was in the periord when topic registration for search database did not 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  

×