moving spawn?
Moderator: Moderators
moving spawn?
can you bind a spawn to a moving object?
-
Rookie One.pl
- Site Admin
- Posts: 2752
- Joined: Fri Jan 31, 2003 7:49 pm
- Location: Nowa Wies Tworoska, Poland
- Contact:
nope. judging from what Rookie said spawnpoints are deleted and their origins recorded before the map is even fully loaded.
your best bet is to make a lot of spawns around your map and enable/disable as needed.
.origin is the coordinates of an entity at whatever time you ask for it. for instance:
that would spam your screen with messages on the player's coordinates. (note it'd be cleaner to use huddraw but this was an example)
your best bet is to make a lot of spawns around your map and enable/disable as needed.
.origin is the coordinates of an entity at whatever time you ask for it. for instance:
Code: Select all
playerTracker:
// tracks the player through the virtual space
while(isAlive $player)
{
iprintln $player.origin
wait .1
}
endModerator
۞
Abyssus pro sapientia
Olympus pro Ignarus
۞
AND STUFF™ © 2006
۞
Abyssus pro sapientia
Olympus pro Ignarus
۞
AND STUFF™ © 2006
Yea but teleport destinations can be added at any time.
the spawn is the same. the tele start is the same. the tele destination -
moves.
So maybe something like -
wont that just return the spawn origin of movingthing?
the spawn is the same. the tele start is the same. the tele destination -
moves.
So maybe something like -
Code: Select all
movingdest.origin = (($movingthing.origin) + ( 0 0 140))
this works -
the trigger is set over a series of background spawns - player spawns on top of a moving box.
the trigger is set over a series of background spawns - player spawns on top of a moving box.
Code: Select all
test_moving_origin:
spawn script_origin "targetname" "nodetest1"
$nodetest1.origin = ( 4365 -5213 -485 )
spawn script_origin "targetname" "nodetest2"
$nodetest2.origin = ( 4365 -6355 -485 )
local.static = spawn script_model targetname testbox
$testbox model "static/indycrate.tik"
$testbox.origin = ( 4365 -6355 -485 )
thread teleport1
thread movetest
end
teleport1:
local.trig1 = spawn trigger_multiple
local.trig1.origin = ( 1133 -2902 -12 )
local.trig1 setsize ( -200 -200 -20 ) ( 200 200 20 )
local.trig1 setthread court1
wait 1
local.trig1 delay 0
end
court1:
self waittill trigger
local.player=parm.other
if (local.player.iscourt==1)
end
local.origin = $testbox.origin
local.player.iscourt=1
local.player tele ((local.origin) + ( 0 0 100))
local.player.iscourt=0
end
movetest:
while(1)
{
wait 2
$testbox moveto $nodetest1
$testbox speed 20
$testbox waitmove
wait 2
$testbox moveto $nodetest2
$testbox speed 20
$testbox waitmove
}
end

