Jump to content

Can models be removed via script?


Go to solution Solved by Lazarus,

Recommended Posts

I am attempting to build a cutscene in which the player blows up a set of rocks via an explosion

 

See as following.

//Generated by BehavEd

rem ( "camera command" );

affect ( "rock", /*@AFFECT_TYPE*/ FLUSH )
{
	wait ( 10500.000 );
	remove ( "rock" );
}


affect ( "explosive", /*@AFFECT_TYPE*/ FLUSH )
{
	wait ( 10500.000 );
	remove ( "explosive" );
}


affect ( "fakeplayer-expl", /*@AFFECT_TYPE*/ FLUSH )
{
	set ( /*@SET_TYPES*/ "SET_NAVGOAL", "plant" );
	wait ( 4000.000 );
	set ( /*@SET_TYPES*/ "SET_NAVGOAL", "hide" );
	wait ( 4000.000 );
	remove ( "fakeplayer-expl" );
}

camera ( /*@CAMERA_COMMANDS*/ ENABLE );
camera ( /*@CAMERA_COMMANDS*/ PAN, $tag( "expl-cam1", ANGLES)$, < 0.000 0.000 0.000 >, 0 );
camera ( /*@CAMERA_COMMANDS*/ MOVE, $tag( "expl-cam1", ORIGIN)$, 0 );
wait ( 5000.000 );
camera ( /*@CAMERA_COMMANDS*/ PAN, $tag( "expl-cam2", ANGLES)$, < 0.000 0.000 0.000 >, 0 );
camera ( /*@CAMERA_COMMANDS*/ MOVE, $tag( "expl-cam2", ORIGIN)$, 0 );
camera ( /*@CAMERA_COMMANDS*/ ZOOM, 10.000, 5000 );
wait ( 5000.000 );
wait ( 3000.000 );
camera ( /*@CAMERA_COMMANDS*/ DISABLE );

Now the entity rock and entity explosive are misc_models (actually, the explosive is a misc_model_static) yet they wont be removed when my explosive triggers. I havent touched yet the object that my model explosive starts deactivated. So my question is, can misc models be removed? and if so, how do i target them, cause the remove functionality doesnt work.

Link to comment

I think they must have a script_targetname name, otherwise it won't work. Not sure, though. 

 

they do have a script_targetname as a regular script targetname

 

entities.jpg

 

ignore the target_scriptname rather than the script_targetname in the rock ;) that was a typo and is already removed.

Link to comment

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...