Re: And/ Or in One

new topic     » goto parent     » topic index » view thread      » older message » newer message

Andy wrote:
> 
> Is there a command in Euphoria that allows for the and/or command to be one.
> 
> Like saying if event here then attack him and/or her. I hope I am making
> enough
> senese. Its it like xor or something. I'm sorry, if I'm confusing, but I'm
> trying
> to explain it as well.


What you want to achieve appears to be done by:
if he exist ehtn
   attack him
end if
if she exist then
   attack her
end if
</eucode
The only potential issue there is, when both enemies are present, "he" is always
attacked before "he", while you'd like some other logic to apply.
If so, no operator will do all the work, you are going to code a little bit
more.
If not, then the above looks good enough, doesn't it?

CChris }}}

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu