Hallo, I have a problem with an "if" function. I want to make a script where when luke will be has less than 50 HP then he will change into a Kyle. I put "if" function in many ways and it not working, Here is the Code:
( //Generated by BehavEd
rem ( "luke1" );
affect ( "luke1", /*@AFFECT_TYPE*/ FLUSH )
{
camera ( /*@CAMERA_COMMANDS*/ ENABLE );
camera ( /*@CAMERA_COMMANDS*/ MOVE, $tag( "ref3", ORIGIN)$, 0 );
camera ( /*@CAMERA_COMMANDS*/ PAN, < 0.000 90.000 0.000 >, < 0.000 0.000 0.000 >, 0 );
camera ( /*@CAMERA_COMMANDS*/ MOVE, $tag( "ref4", ORIGIN)$, 16000 );
set ( /*@SET_TYPES*/ "SET_WALKING", /*@BOOL_TYPES*/ "true" );
set ( /*@SET_TYPES*/ "SET_NAVGOAL", "nav1b" );
wait ( 16000.000 );
task ( "lukedial1" )
{
sound ( /*@CHANNELS*/ CHAN_AUTO, "sound/chars/luke1/lukedia1.mp3" );
}
dowait ( "lukedial1" );
//$"default"@6
set ( /*!*/ "SET_BEHAVIOR_STATE", /*!*/ "BS_DEFAULT" );
set ( /*!*/ "SET_CHASE_ENEMIES", /*!*/ "true" );
set ( /*!*/ "SET_LOOK_FOR_ENEMIES", /*!*/ "true" );
set ( /*!*/ "SET_IGNOREALERTS", /*!*/ "false" );
set ( /*!*/ "SET_WALKING", /*!*/ "false" );
set ( /*!*/ "SET_RUNNING", /*!*/ "false" );
wait ( 2000.000 );
set ( /*@SET_TYPES*/ "SET_SABERACTIVE", /*@BOOL_TYPES*/ "true" );
wait ( 20000.000 );
camera ( /*@CAMERA_COMMANDS*/ DISABLE );
if ( $get( FLOAT, "SET_HEALTH")$, $<$, $50$ )
{
set ( /*@SET_TYPES*/ "SET_PLAYERMODEL", "Kyle" );
}
}
)What should I Do?