Jump to content

Speed vs time in scripts


Recommended Posts

Posted

Originally posted something else in this topic, but have edited to fit my new problem:

 

Can I set a *speed* for the elevator, instead of a time to complete its task? Using the same amount of time to reach the top or bottom from anywhere in the lift ride, gets a bit inconsistent.

 
 
//Generated by BehavEd

rem ( "Player triggers lift from inside" );

if ( $get( FLOAT, "SET_PARM1")$, $=$, $0$ )
{
set ( /*@SET_TYPES*/ "SET_PARM1", "1" );

task ( "moveup" )
{

affect ( "towerlift", /*@AFFECT_TYPE*/ FLUSH )
{
move ( $tag( "towerlift_t2", ORIGIN)$, < 0.000 0.000 0.000 >, 5000.000 );

affect ( "towerlift_trigger", /*@AFFECT_TYPE*/ FLUSH )
{
move ( $tag( "towerlift_t2_trigger", ORIGIN)$, < 0.000 0.000 0.000 >, 5000.000 );
}

}

}

do ( "moveup" );
}


else (  )
{
set ( /*@SET_TYPES*/ "SET_PARM1", "0" );

task ( "movedown" )
{

affect ( "towerlift", /*@AFFECT_TYPE*/ FLUSH )
{
move ( $tag( "towerlift_t1", ORIGIN)$, < 0.000 0.000 0.000 >, 5000.000 );

affect ( "towerlift_trigger", /*@AFFECT_TYPE*/ FLUSH )
{
move ( $tag( "towerlift_t1_trigger", ORIGIN)$, < 0.000 0.000 0.000 >, 5000.000 );
}

}

}

do ( "movedown" );
}
Posted

Can I set a *speed* for the elevator, instead of a time to complete its task?

No. You can only hard code different times for different states, i.e. save the current location and execute different moves depending on that.
Boothand likes this

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...