Re: And/ Or in One
- Posted by CChris <christian.cuvier at a?riculture.gouv.fr> Jul 08, 2007
- 554 views
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 }}}