Jump to content

Home

spawning and elevaters


yoda-the-wise

Recommended Posts

yoda-the-wise: Sure. E-mail me a javaguy@sammckee.com.

 

 

 

Gohan_Trunksss: Search the tutorials or write your own (you'll probably end up changing it to customize behavior anyway). Here's one from a map I'm working on. Be advised it still has a couple of bugs, but the basic functionality works.

 

//Generated by BehavEd

 

rem ( "PARM1 - func_static, elevator, script_targetname" );

rem ( "PARM2 - ref_tag, up position, targetname" );

rem ( "PARM3 - ref_tag, down position, targetname" );

rem ( "PARM4 - func_usable, active button, script_targetname" );

rem ( "PARM5 - func_usable, inactive button, script_targetname" );

rem ( "PARM6 - Either up or down" );

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

rem ( "Start moving, so hide inactive button and show active button" );

 

affect ( $get( STRING, "SET_PARM4")$, /*@AFFECT_TYPE*/ FLUSH )

{

set ( "SET_FUNC_USABLE_VISIBLE", "true" );

}

 

 

affect ( $get( STRING, "SET_PARM5")$, /*@AFFECT_TYPE*/ FLUSH )

{

set ( "SET_FUNC_USABLE_VISIBLE", "false" );

}

 

rem ( "Move the elevator" );

declare ( /*@DECLARE_TYPE*/ STRING, "elevator_destination" );

 

if ( $get( STRING, "SET_PARM6") = "up"$ )

{

rem ( "Move elevator up" );

set ( "elevator_destination", $get( STRING, "SET_PARM2")$ );

}

 

 

else ( )

{

rem ( "Move elevator down" );

set ( "elevator_destination", $get( STRING, "SET_PARM3")$ );

}

 

 

affect ( $get( STRING, "SET_PARM1")$, /*@AFFECT_TYPE*/ FLUSH )

{

 

task ( "move_elevator" )

{

move ( $tag( get(STRING, "elevator_destination"), ORIGIN)$, 2000.000 );

}

 

dowait ( "move_elevator" );

}

 

free ( "elevator_destination" );

rem ( "Stop moving, so show inactive state button and hide active state button" );

 

affect ( $get( STRING, "SET_PARM4")$, /*@AFFECT_TYPE*/ FLUSH )

{

set ( "SET_FUNC_USABLE_VISIBLE", "false" );

}

 

 

affect ( $get( STRING, "SET_PARM5")$, /*@AFFECT_TYPE*/ FLUSH )

{

set ( "SET_FUNC_USABLE_VISIBLE", "true" );

}

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...