1. Lasting Loopa
------=_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--
2. Re: Lasting Loopa
------=_NextPart_000_0010_01C00605.C3BCB020
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi Thomas
Try a while loop
ie
atom health
health=3D1
while health>0 do
-- do health change here like add or subtract from health
end while
puts(1,"you died")
abort(1)
Bye
Martin
----- Original Message -----=20
From: Paul Kerslake=20
To: EUPHORIA at LISTSERV.MUOHIO.EDU=20
Sent: Monday, August 14, 2000 3:31 PM
Subject: Lasting Loopa
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_0010_01C00605.C3BCB020
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4134.600" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>Hi Thomas</FONT></DIV>
<DIV><FONT size=3D2>Try a while loop</FONT></DIV>
<DIV><FONT size=3D2>ie</FONT></DIV>
<DIV><FONT size=3D2>atom health</FONT></DIV>
<DIV><FONT size=3D2>health=3D1</FONT></DIV>
<DIV><FONT size=3D2>while health>0 do</FONT></DIV>
<DIV><FONT size=3D2> -- do health change here like add =
or=20
subtract from health</FONT></DIV>
<DIV><FONT size=3D2>end while</FONT></DIV>
<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 size=3D2>Bye<BR>Martin<BR></FONT></DIV></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV=20
style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
black"><B>From:</B>=20
<A title=3Dpaulk at UNISERVE.COM href=3D"mailto:paulk at UNISERVE.COM">Paul =
Kerslake</A>=20
</DIV>
<DIV style=3D"FONT: 10pt arial"><B>To:</B> <A =
title=3DEUPHORIA at LISTSERV.MUOHIO.EDU=20
=
</A>=20
</DIV>
<DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Monday, August 14, 2000 =
3:31=20
PM</DIV>
<DIV style=3D"FONT: 10pt arial"><B>Subject:</B> Lasting Loopa</DIV>
<DIV><BR></DIV>
<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=20
at the moment, but I need some help. I need to know how to create a =
command to=20
have the program check the players health over and over. Here's what I =
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=20
begginning 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>
<DIV><FONT face=3DArial =
------=_NextPart_000_0010_01C00605.C3BCB020--