how would i get an elevator to go to random floors?
i got the ( randomfloat 1 + 7 ) but i dont know how to get it to work to get an elevator to move to a floor OTHER than its own...
random floors for elevators
Moderator: Moderators
-
Master-Of-Fungus-Foo-D
- Muffin Man
- Posts: 1544
- Joined: Tue Jan 27, 2004 12:33 am
- Location: cali, United States
-
Master-Of-Fungus-Foo-D
- Muffin Man
- Posts: 1544
- Joined: Tue Jan 27, 2004 12:33 am
- Location: cali, United States
Master-Of-Fungus-Foo-D, your problem isn't that you "over complicate things", but that you tend to under explain your ideas.
"I dont know how to get it to work to get an elevator to move to a floor OTHER than its own...".
That is very confusing to the readers of your post. No one likes to waste time trying to figure out what you ment to say.
If you need help with a script or thread, POST IT, and explain what you have tried already.
"I dont know how to get it to work to get an elevator to move to a floor OTHER than its own...".
That is very confusing to the readers of your post. No one likes to waste time trying to figure out what you ment to say.
If you need help with a script or thread, POST IT, and explain what you have tried already.
This is how I would do it for say a three level elevator with a single trigger in the actual elevator. If you have multiple triggers then it will make it more complicated. The $wp(x) are waypoints for the origin of the center of the elevator which must be made a script_object with a targetname of $vator.
Code: Select all
level.vatormoving = 0
thread ele_trig
//------------
ele_trig:
//------------
while (1)
{
elevator_trigger waittill trigger
local.player = parm.other
if (level.vatormoving ==1)
{
local.player iprint "Wait till elevator has stopped fool"
}
else
{
switch (randomint(3)+1)
{
case 1: waitthread move_vator $wp1 ; break
case 2: waitthread move_vator $wp2 ; break
case 3: waitthread move_vator $wp3 ; break
}
}
waitframe
}
end
//------------------------
move_vator local.dest:
//------------------------
level.vatormoving = 1
$vator moveto local.dest
$vator loopsound somegoodvatormusic
$vator waitmove
$vator stoploopsound somegoodvatormusic
level.vatormoving = 0
end
