Jump to content

Home

Elevator/Lift triggers??


wedge2211

Recommended Posts

I thought I posted this, but the browser seems to have killed it...hmmm....

 

I have a situation with a func_plat where I want one triggger to activate the plat, but that trigger won't activate until ANOTHER trigger is tripped. So players would have to fire trigger1, THEN trigger2, and THEN the lift will work. So I made a func_plat, targeted one trigger at it (wait 2), and targeted a second trigger at the first trigger (also wait 2). But the effect is that when the second trigger is fired, the elevevator takes off as if there was only one trigger in the chain. How can I fix this??

 

Again, I want the player to pass through ONE trigger area, which activates a SECOND trigger (inactive until the first trigger is fired), which will activate the func_plat when it is fired.

Link to comment
Share on other sites

*bump*

 

Okay, THe idea is I have a trigger that the player steps on when they get on the elevator on the bottom that will send the elevator UP, but I don't want the elevator to be sent right back up as soon as the player reaches the bottom when coming DOWN, so I made a second trigger that the player has to pass through at the bottom that will ideally activate the elevator-up trigger. Now please, how the heck do I do this??

Link to comment
Share on other sites

well...I havn't done anything with my lifts yet but make them!!!

I am going to use this tutorial i cut and pasted to make lifts that use scripting..which is the way raven did it in game...

 

Its tough when noone replies to a post i know, so i hope this helps you a bit.

--------------------

--------------------

lifts

 

Well, i've spent the afternoon fiddling with the scripts for elevator's. Before, I could never get func_plats or func_doors to work properly as elevators. After looking at the sample maps, i've finally managed to get them going, so i thought i'd post a little tut on here to help any would-be lift makers who are having probs. You don't need to work out any heights or anything for this, which is groovy....here goes! This tutorial will let you make a lift that you call down (or up) and then ride to it's destination...

 

1. Create your elevator...it can be any brush you like. Draw it in the position you want your lift to start.

 

2. Create a small cuboid brush and put it in the centre of your elevator brush (yes, slap bang in the middle). Load the "system" textures and select the Origin texture. Once this is done, select the elevator brush and the origin brush, right click and select func>func_static.

 

3. Deselect all brushes (esc). Now, right click the orthographic view and select ref>ref_tag.

 

4. Position the ref_tag in the dead centre of your origin brush. Then, clone it and move it vertically straight up or down. This is where the lift will end up when you call it. Make sure the two tags are lined up.

 

5. Next, create your switches. Make a brush, clone it, and place them in the same position, overlapping each other. Select one of the brushes, right click, and select "func_usable"

 

6. Next, create your trigger. This is what makes everything work when you hit the use key. Draw your trigger, texture it, and make it a trigger_multiple.

 

7. Create a scriptrunner. Right click, and select target>target_scriptrunner.

 

8. Create a target_relay. Right click, and select target>target_relay.

 

Ok, your set to go. The next step depends on what script you use. For this tutorial, i'm using "artus_mine/el_in_hall.ibi". If you've got the latest tools, all the SP scripts are decompiled in a zip file ready for browsing. There are several elevator scripts, and they all work on the basic principles i'll outline below....

 

9. Select your elevator (the func_static entity), and press N. Add the following key

 

script_targetname

el_in_hall

 

10. Select your trigger. Add the following key

 

target

elevscript1

 

Tick the playeronly and use_button checkboxes.

 

11. Select your target_scriptrunner. Add the following keys

 

targetname

elevscript1

 

usescript

artus_mine/el_in_hall

 

12. Select your relay. Add the following keys:

 

targetname

elevscript1

 

target

el4butt

 

13. Select your func_usable brush. Add the following key

 

targetname

el4butt

 

14. The final step is naming your tags. This is a good point to look at the script itself:

 

//Generated by BehavEd

 

rem ( "The elevator inside the big mashine" );

 

affect ( "kyle", /*@AFFECT_TYPE*/ INSERT )

{

sound ( /*@CHANNELS*/ CHAN_AUTO, "sound/movers/switches/switch1.mp3" );

}

 

 

affect ( "el_in_hall", /*@AFFECT_TYPE*/ FLUSH )

{

use ( "el4butt" );

move ( $tag("el_in_hall_up",ORIGIN)$, $<0 0 0>$, 2000.000 );

wait ( 4000.000 );

move ( $tag("el_in_hall_down",ORIGIN)$, $<0 0 0>$, 2000.000 );

use ( "el4butt" );

}

 

______________________________

 

Ok...

 

affect ( "el_in_hall", /*@AFFECT_TYPE*/ FLUSH )

 

This line lets the script know what to move

 

move ( $tag("el_in_hall_up",ORIGIN)$, $<0 0 0>$, 2000.000 );

 

 

This line tells the elevator where to go first. Try not to think of it as up and down, but 1st and 2nd. "el_in_hall_up" is the targetname of one of our tags.

 

wait ( 4000.000 );

move ( $tag("el_in_hall_down",ORIGIN)$, $<0 0 0>$, 2000.000 );

 

 

These lines tell the elevator to wait, then go to the other tag.

 

So, what the script is doing is waiting for the button to be pressed, moving the elevator to a tag, waiting, and moving it to the other tag.

 

So we need to name our tags accordingly...if i want my el to move down, i still name my ref_tag "el_in_hall_up", because that's where the script wants to go first.

 

So, name the destination tag "el_in_hall_up" and the return flag "el_in_hall_down" (use targetname)

 

Ok, compile your map, and all should be well.

 

This is the basic template for all elevator (and movement) scripts. Fiddle around and see what you can come up with!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...