 |
Castle Paradox
|
View previous topic :: View next topic |
Author |
Message |
Pako the True G pako

Joined: 26 Mar 2005 Posts: 184 Location: Bleh-ville
|
Posted: Wed Oct 26, 2005 12:55 pm Post subject: help meh |
|
|
could someone pleez tell me why dis script wont compile...?
Code: | Define Script (8,Racing,none)
script, Racing, begin
suspend player
variable (starttime)
starttime := system second
while (system second << starttime + 5) do (
clear string (31)
append number (31, starttime + 5 - system second)
center string at (31, 160, 196)
wait )
hide string (31)
resume player
variable (winner)
while (winner == 0) do (
#AI goes here
if (npc is walking (npc) == 0) then (
if ((read pass block(npc x(npc), npc y(npc)), and, 4) or (read pass block(npc x(npc), npc y(npc) + 1), and, 1))
then ( walk npc (npc, random(0,1)*2+1, 1) ) else ( walk npc (npc, down, 1) )
if (at finish line (hero x, hero y)) then (winner := 1)
if (at finish line (npc x(npc), npc y(npc))) then (winner := 2)
wait
if (winner == 1) then ( you won stuff )
if (winner == 2) then ( teleport to map (00,10,18)
end |
_________________
 |
|
Back to top |
|
 |
Cube Dimensional Traveller

Joined: 02 Feb 2003 Posts: 294
|
Posted: Wed Oct 26, 2005 1:21 pm Post subject: |
|
|
Missing 3 ) thingies at the end. This should compile:
Code: |
Define Script (8,Racing,none)
script, Racing, begin
suspend player
variable (starttime)
starttime := system second
while (system second << starttime + 5) do (
clear string (31)
append number (31, starttime + 5 - system second)
center string at (31, 160, 196)
wait
)
hide string (31)
resume player
variable (winner)
while (winner == 0) do (
#AI goes here
if (npc is walking (npc) == 0) then (
if ((read pass block(npc x(npc), npc y(npc)), and, 4) or (read pass block(npc x(npc), npc y(npc) + 1), and, 1)) then (
walk npc (npc, random(0,1)*2+1, 1)
) else (
walk npc (npc, down, 1)
)
if (at finish line (hero x, hero y)) then (
winner := 1
)
if (at finish line (npc x(npc), npc y(npc))) then (
winner := 2
)
wait
if (winner == 1) then (
you won stuff
)
if (winner == 2) then (
teleport to map (00,10,18)
)
)
)
end
|
|
|
Back to top |
|
 |
Pako the True G pako

Joined: 26 Mar 2005 Posts: 184 Location: Bleh-ville
|
Posted: Wed Oct 26, 2005 2:12 pm Post subject: |
|
|
thanks!  _________________
 |
|
Back to top |
|
 |
Battleblaze Warrior Thread Monk

Joined: 19 Dec 2003 Posts: 782 Location: IndY OHR
|
Posted: Fri Nov 04, 2005 2:53 pm Post subject: |
|
|
OHR racing!? Hotdamn that ideas been in ym head forever but I never figured how I would work it. If you need some graphics I'd behappy to make some. _________________ Indy OHR! and National OHR Month Contest going on now!
"Aeth calls PHC an anti-semite; PHC blames anti-semitism"
-squall |
|
Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|