Creating the perfect elevator with doors ?!?
Moderator: Moderators
Creating the perfect elevator with doors ?!?
Ok boys, in this site and others we see tutorials explaining how make a elevator using a brush with DOOR function.
All samples working perfect, but al samples have a little problem, the sound !
When a trigger->use start the job of elevator (to up or down) he play a common door sound, and dont enter into a loop of a sound to create effect of elevator working.
I see many tutorials like :
More functional :
/t.php?id=91 and
More complex, but with best result:
http://dynamic6.gamespy.com/~rjukanproj ... e=Elevator
My question, is possible manipulate sound together elevator "life cycle work" ????
All samples working perfect, but al samples have a little problem, the sound !
When a trigger->use start the job of elevator (to up or down) he play a common door sound, and dont enter into a loop of a sound to create effect of elevator working.
I see many tutorials like :
More functional :
/t.php?id=91 and
More complex, but with best result:
http://dynamic6.gamespy.com/~rjukanproj ... e=Elevator
My question, is possible manipulate sound together elevator "life cycle work" ????
Re: Creating the perfect elevator with doors ?!?
What did u have in mind in detail? Your 2nd example link (which by the way does NOT use a func_door) got lots of sound commands in the script. You can easily change, add or delete them.mcunha98 wrote:My question, is possible manipulate sound together elevator "life cycle work" ????
You might also want to check out TlTrude's tutorial maps altelevator and testpointer @ http://smallsumo.leveledit.com/tltrude/index.html, which show some other elevators
Re: Creating the perfect elevator with doors ?!?
Really the test pointer of TLTrude its a great and beautiful sample of potencial of MOH Engine. But the sample of TLTrude use a scripted object, and no never he work correctly.Wacko wrote:You might also want to check out TlTrude's tutorial maps altelevator and testpointer @ http://smallsumo.leveledit.com/tltrude/index.html, which show some other elevators
My question relative of door to elevator function is:
1) How setup the sound of start, during and end elevator job ?
2) The door function force the object to return in original position, is possible change this parameter to never return, only with interaction of user into a trigger->use to move into point A to B
Re: Creating the perfect elevator with doors ?!?
1) How setup the sound of start, during and end elevator job ?
I think, u can just use standard door sounds for elevators made out of doors and without using a script
2) The door function force the object to return in original position, is possible change this parameter to never return, only with interaction of user into a trigger->use to move into point A to B
Try to check the 'toggle' checkbox in the door's entity inspector
I think, u can just use standard door sounds for elevators made out of doors and without using a script
2) The door function force the object to return in original position, is possible change this parameter to never return, only with interaction of user into a trigger->use to move into point A to B
Try to check the 'toggle' checkbox in the door's entity inspector
script_origin
For one of the elevators in the map "Gotterdammerung" I used script origins to trigger the hatch doors. The distance the two script_origins are apart is checked continuously using the while loop in the thread shown below.


Code: Select all
ele7_hatch:
$ele7_hatch_left time .2
$ele7_hatch_right time .2
$e7_bar_origin bind $ele7_bar
$ele7_bar bind $ele7
level.e7hp = 0
while (1)
{
if ((vector_length ($e7_bar_origin.origin - $e7_hatch_origin.origin) < 128) && (level.e7hp == 0))
{
$ele7_hatch_left openportal
$ele7_hatch_left playsound stardoor_snd
$ele7_hatch_right rotateZup -90
$ele7_hatch_left rotateZup 90
$ele7_hatch_right move
$ele7_hatch_left waitmove
level.e7hp = 1
}
if ((vector_length ($e7_bar_origin.origin - $e7_hatch_origin.origin) > 128) && (level.e7hp == 1))
{
$ele7_hatch_left playsound stardoor_snd
$ele7_hatch_right rotateZup 90
$ele7_hatch_left rotateZup -90
$ele7_hatch_right move
$ele7_hatch_left waitmove
$ele7_hatch_left closeportal
level.e7hp = 0
}
wait .01
}
waitframe
end
Re: script_origin
hehe, nice onetltrude wrote:For one of the elevators in the map "Gotterdammerung" I used script origins to trigger the hatch doors. The distance the two script_origins are apart is checked continuously using the while loop in the thread shown below.
but I think that's way more than mcunha wants
u surely could explain to him though, how to use the stopsound and movesound keys in his door entity. That's something he might want to use
btw, doesn't this elevator lead to the room I can see through the glass floor? If so, what is the 'closeportal' for?
hatch
Look for the post with the same image in this thread, Wacko.
/forum/viewtopic.php?t=6823
/forum/viewtopic.php?t=6823
Re: hatch
errr, yes!? both rooms in area A, so an areaportal is obsolete there!? Oh my, forget it, doesn't matter anyway and I didn't plan to hijack this threadtltrude wrote:Look for the post with the same image in this thread, Wacko.
/forum/viewtopic.php?t=6823
no
No, the elevator leads to another room--not the same room as the one below the glass. The glass is a breakable window.
-
Bjarne BZR
- Site Admin
- Posts: 3298
- Joined: Wed Feb 05, 2003 2:04 pm
- Location: Sweden
- Contact:
So mcunha98, what you want is to loop a sound until the elevator has completed its run, right? In my tutorial I used sounds that had the correct length, so there was no need to stop it. But for a looping sound, the trick is to know when the sound should be stopped.
So, first start the sound in a loop with this command:
...Then stop it with this:
Now when to stop it? Well: you just set this command on the elevator ( it tells it how long it should take to move to the destination ):
...and then you can delay the call to the stoploopsound command the same amount of time that you specified in the time command using this command:
( He he... command executing a command... funny
)
If you dont have a lot of experience in scripting, this may be a bit complex, so just ask away if you need to.
So, first start the sound in a loop with this command:
Code: Select all
loopsound( String soundName, [ Float volume ], [ String minimum_distance ] )
play a looped-sound with a certain volume and minimum_distance
which is attached to the current entity.Code: Select all
stoploopsound
Stop the looped-sound on this entity.Code: Select all
time( Float traveltime )
Sets the time it takes to do move commands applied to the entity.Code: Select all
commanddelay( Float delay, String command, [ String [arg1] ], [ String [arg2] ], [ String [arg3] ], [ String [arg4] ], [ String [arg5] ], [ String [arg6] ] )
executes a command after the given delayIf you dont have a lot of experience in scripting, this may be a bit complex, so just ask away if you need to.
-
Green Beret
- Major General
- Posts: 746
- Joined: Mon Apr 19, 2004 12:21 pm
- Contact:
if its not for a stock map you can always do
Key/Value
lip(how high it goes*)/-248
sound_open_start/lighthouse_run
sound_open_end/snd_step_paper
sound_close_start/lighthouse_run
sound_close_end/snd_step_paper
time/3.00
this is more for a 2 floor elevator,not multiple floors.
in another thread this was talked about and wacko made a nice lil elevator script for multiple floors.i would guess do a search for elevator.
Key/Value
lip(how high it goes*)/-248
sound_open_start/lighthouse_run
sound_open_end/snd_step_paper
sound_close_start/lighthouse_run
sound_close_end/snd_step_paper
time/3.00
this is more for a 2 floor elevator,not multiple floors.
in another thread this was talked about and wacko made a nice lil elevator script for multiple floors.i would guess do a search for elevator.
-
Master-Of-Fungus-Foo-D
- Muffin Man
- Posts: 1544
- Joined: Tue Jan 27, 2004 12:33 am
- Location: cali, United States
Well,
Reading all post, i see the subject is very very cool.
Of all replys, the "prefab" of bdbodger its the best way, putting the .scr file into global and passing parameters like he need, is possible using a full elevator with door including sound.
I will try use the script of bdbodger in my map to test, thanks a lot for all to replys !!!!
TLTrude, without questions, your script and sample is very usefull, but, my machine dont is a exactly the best PC to test more of 3 times a map.
Reading all post, i see the subject is very very cool.
Of all replys, the "prefab" of bdbodger its the best way, putting the .scr file into global and passing parameters like he need, is possible using a full elevator with door including sound.
I will try use the script of bdbodger in my map to test, thanks a lot for all to replys !!!!
TLTrude, without questions, your script and sample is very usefull, but, my machine dont is a exactly the best PC to test more of 3 times a map.




