Lasting Loopa

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

------=_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>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I'm making a text-based D&amp;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>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>integer =
health,damage,hitmiss</FONT></DIV>
<DIV>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</DIV>

------=_NextPart_000_0005_01C00604.BF8871C0--

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

Search



Quick Links

User menu

Not signed in.

Misc Menu