Syntax error ????
Posted: Sun Sep 26, 2004 4:57 pm
hi all
The arrays script was done by Bdbodger, but when i add it to my map script nothing work , like if there were a syntax error.
when i take off this part of script everything work fine ( moving objects, hided objects etc etc):
I guess something is bad writted......
can someone spot the error plz , i am bad with arrays
thanks you
The arrays script was done by Bdbodger, but when i add it to my map script nothing work , like if there were a syntax error.
when i take off this part of script everything work fine ( moving objects, hided objects etc etc):
I guess something is bad writted......
can someone spot the error plz , i am bad with arrays
thanks you
Code: Select all
tele_porter1:
local.player = parm.other
try_again1:
for(local.i=1;local.i <= $tunnel_destination1.size;local.i++)
{
if($tunnel_destination1[local.i].isused != 1)
{
$tunnel_destination1[local.i].isused = 1
local.player tele $tunnel_destination1[local.i].origin
local.player playsound vortex
//local.player freezeplayer
local.player physics_off
local.mover = spawn script_model model "fx/dummy.tik"
local.mover.origin = local.player.origin
local.player glue local.mover
local.mover time 2
local.mover moveto $t1
local.mover waitmove
local.player unglue local.mover
local.mover remove
local.player tele $egypt_destination
//local.player releaseplayer
local.player physics_on
wait 2
while(local.player.is_teled != 1)
{
for(local.a =1;local.a <= $egypt_destination.size;local.a++)
{
if($egypt_destination[local.a].isused != 1)
{
local.player.is_teled = 1
local.player tele $egypt_destination[local.a].origin
$tunnel_destination1[local.i].isused = 0
}
}
waitframe
}
}
if(local.player.is_teled == 1)
{
local.player.is_teled = 0
end
}
waitframe
goto try_again1
}
end
tele_check1:
local.player = parm.other
self.isused = 1
while(local.player is touching self)
waitframe
self.isused = 0
end
tele_porter2:
local.player = parm.other
try_again2:
for(local.i=1;local.i <= $tunnel_destination2.size;local.i++)
{
if($tunnel_destination2[local.i].isused != 1)
{
$tunnel_destination2[local.i].isused = 1
local.player tele $tunnel_destination2[local.i].origin
local.player playsound vortex
//local.player freezeplayer
local.player physics_off
local.mover = spawn script_model model "fx/dummy.tik"
local.mover.origin = local.player.origin
local.player glue local.mover
local.mover time 2
local.mover moveto $t2
local.mover waitmove
local.player unglue local.mover
local.mover remove
local.player tele $stargate_destination
//local.player releaseplayer
local.player physics_on
wait 2
while(local.player.is_teled != 1)
{
for(local.a =1;local.a <= $stargate_destination.size;local.a++)
{
if($stargate_destination[local.a].isused != 1)
{
local.player.is_teled = 1
local.player tele $stargate_destination[local.a].origin
$tunnel_destination2[local.i].isused = 0
}
}
waitframe
}
}
if(local.player.is_teled == 1)
{
local.player.is_teled = 0
end
}
waitframe
goto try_again2
}
end
tele_check2:
local.player = parm.other
self.isused = 1
while(local.player is touching self)
waitframe
self.isused = 0
end
ring_teleporter1:
//ring time
$ring1 time .3
$ring2 time .3
$ring3 time .3
$ring4 time .3
$ring5 time .3
$ring1_1 time .3
$ring2_2 time .3
$ring3_3 time .3
$ring4_4 time .3
$ring5_5 time .3
thread tele_porter3
end
tele_porter3:
local.player = parm.other
try_again3:
$ring_trigger waittill trigger
local.player playsound ring
$ring1 movedown 200
$ring1 waitmove
$ring1_1 movedown 200
$ring1_1 waitmove
$ring2 movedown 200
$ring2 waitmove
$ring2_2 movedown 200
$ring2_2 waitmove
$ring3 movedown 200
$ring3 waitmove
$ring3_3 movedown 200
$ring3_3 waitmove
$ring4 movedown 200
$ring4 waitmove
$ring4_4 movedown 200
$ring4_4 waitmove
$ring5 movedown 200
$ring5 waitmove
$ring5_5 movedown 200
$ring5_5 waitmove
$ringteleport_trigger triggerable
$ring_trigger nottriggerable
$ring5 moveup 200
$ring5 waitmove
$ring5_5 moveup 200
$ring5_5 waitmove
$ring4 moveup 200
$ring4 waitmove
$ring4_4 moveup 200
$ring4_4 waitmove
$ring3 moveup 200
$ring3 waitmove
$ring3_3 moveup 200
$ring3_3 waitmove
$ring2 moveup 200
$ring2 waitmove
$ring2_2 moveup 200
$ring2_2 waitmove
$ring1 moveup 200
$ring1 waitmove
$ring1_1 moveup 200
$ring1_1 waitmove
wait 3
$ring_trigger triggerable
for(local.i=1;local.i <= $ring_destination1.size;local.i++)
{
if($ring_destination1[local.i].isused != 1)
{
$ring_destination1[local.i].isused = 1
local.player tele $ring_destination1[local.i].origin
waitframe
if(local.player.is_teled == 1)
{
local.player.is_teled = 0
end
}
waitframe
goto ring_teleporter1
}
end
tele_check3:
local.player = parm.other
self.isused = 1
while(local.player is touching self)
waitframe
self.isused = 0
end
ring_teleporter2:
//ring time
$ring1 time .3
$ring2 time .3
$ring3 time .3
$ring4 time .3
$ring5 time .3
$ring1_1 time .3
$ring2_2 time .3
$ring3_3 time .3
$ring4_4 time .3
$ring5_5 time .3
thread tele_porter4
end
tele_porter4:
local.player = parm.other
try_again3:
$ring_trigger2 waittill trigger
local.player playsound ring
$ring1 movedown 200
$ring1 waitmove
$ring1_1 movedown 200
$ring1_1 waitmove
$ring2 movedown 200
$ring2 waitmove
$ring2_2 movedown 200
$ring2_2 waitmove
$ring3 movedown 200
$ring3 waitmove
$ring3_3 movedown 200
$ring3_3 waitmove
$ring4 movedown 200
$ring4 waitmove
$ring4_4 movedown 200
$ring4_4 waitmove
$ring5 movedown 200
$ring5 waitmove
$ring5_5 movedown 200
$ring5_5 waitmove
$ringteleport_trigger2 triggerable
$ring_trigger nottriggerable
$ring5 moveup 200
$ring5 waitmove
$ring5_5 moveup 200
$ring5_5 waitmove
$ring4 moveup 200
$ring4 waitmove
$ring4_4 moveup 200
$ring4_4 waitmove
$ring3 moveup 200
$ring3 waitmove
$ring3_3 moveup 200
$ring3_3 waitmove
$ring2 moveup 200
$ring2 waitmove
$ring2_2 moveup 200
$ring2_2 waitmove
$ring1 moveup 200
$ring1 waitmove
$ring1_1 moveup 200
$ring1_1 waitmove
wait 3
$ring_trigger2 triggerable
for(local.i=1;local.i <= $ring_destination2.size;local.i++)
{
if($ring_destination2[local.i].isused != 1)
{
$ring_destination2[local.i].isused = 1
local.player tele $ring_destination2[local.i].origin
waitframe
if(local.player.is_teled == 1)
{
local.player.is_teled = 0
end
}
waitframe
goto ring_teleporter2
}
end
tele_check4:
local.player = parm.other
self.isused = 1
while(local.player is touching self)
waitframe
self.isused = 0
end
end