Is there any way to destroy a created object. Not a refrence to an obj objective. Lets say i create a corona for example then i want that object to (for lack of better term) Disappear, i know in other programing languages they use a destroy or release command but havent seen anything as far as medal of honor is concerned.
Thanks
H4tt3r
Destroy an object
Moderator: Moderators
Create a script_model, select it, press "N" to open the entity dialouge, and create these entries:
Key: model
Value: fx/corona_red.tik
Key: targetname
Value: mycorona
In the script insert at the point, where you want to "destroy" your corona, the lines:
To show it, if its hidden, use:
Key: model
Value: fx/corona_red.tik
Key: targetname
Value: mycorona
In the script insert at the point, where you want to "destroy" your corona, the lines:
Code: Select all
$mycorona hide
$mycorona notsolid
Code: Select all
$mycorona show
$mycorona solid
remove
If the players can't see it, frame rate goes up!
You can also remove things by "classname" in the script -- I don't remember how. But, if you tell the game to remove the classname "corona_red", all of the red coronas in the map would vanish.
You can also remove things by "classname" in the script -- I don't remember how. But, if you tell the game to remove the classname "corona_red", all of the red coronas in the map would vanish.
Code: Select all
removeclass actor
