Lasting Loopa
- Posted by Paul Kerslake <paulk at UNISERVE.COM> Aug 14, 2000
- 522 views
------=_NextPart_000_0005_01C00604.BF8871C0 charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, I'm making a text-based D&D combat simulator at the moment, but I need = some help. I need to know how to create a command to have the program = check the players health over and over. Here's what I mean. integer health,damage,hitmiss health=3D30 damage=3Drand(8) hitmiss=3Drand(20) if hitmiss !=3D1 health=3Dhealth - damage end if. I tried putting an 'if' statement at the begginning of my program, = something like;=20 if health=3D0 then puts(1,"you died") abort(1) end if But, Euphoria only checks that once, I need it to check it each time = damage is dealt/received. Please help, -Thomas ------=_NextPart_000_0005_01C00604.BF8871C0 charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META content=3D"text/html; charset=3Diso-8859-1" = http-equiv=3DContent-Type> <META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT face=3DArial size=3D2>Hi,</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2>I'm making a text-based D&D combat = simulator at=20 the moment, but I need some help. I need to know how to create a command = to have=20 the program check the players health over and over. Here's what I=20 mean.</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2>integer = health,damage,hitmiss</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2>health=3D30</FONT></DIV> <DIV><FONT face=3DArial size=3D2>damage=3Drand(8)</FONT></DIV> <DIV><FONT face=3DArial size=3D2>hitmiss=3Drand(20)</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2>if hitmiss !=3D1</FONT></DIV> <DIV><FONT face=3DArial size=3D2>health=3Dhealth - damage</FONT></DIV> <DIV><FONT face=3DArial size=3D2>end if.</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2>I tried putting an 'if' statement at = the begginning=20 of my program, something like; </FONT></DIV> <DIV><FONT face=3DArial size=3D2>if health=3D0 then</FONT></DIV> <DIV><FONT face=3DArial size=3D2>puts(1,"you died")</FONT></DIV> <DIV><FONT face=3DArial size=3D2>abort(1)</FONT></DIV> <DIV><FONT face=3DArial size=3D2>end if</FONT></DIV> <DIV><FONT face=3DArial size=3D2>But, Euphoria only checks that once, I = need it to=20 check it each time damage is dealt/received. Please help,</FONT></DIV> <DIV> </DIV> ------=_NextPart_000_0005_01C00604.BF8871C0--