Frictional Games Forum (read-only)

Full Version: Problem deactivating entity
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm working on a custom story and I've spawned the entity "Deformed Man" (Statue). The name of the entity is deformed_man_1, in my .hps-file I've deactivated this entity at the beginning:
Code:
void OnStart()
{
//Player Enviroment//
FadeOut(0);
AddTimer("", 1, "StartTheGame");
SetLightVisible("PointLight_2", false);

//Music//
PlaySoundAtEntity("", "general_rain.ogg", "Player", 3, true);
PlaySoundAtEntity("", "general_thunder.ogg", "Player", 3, true);

//Collides//
AddEntityCollideCallback("armour_rusty_head_1", "ScriptArea_1", "LevelDoorIs", true, 1);

//Interactions//
SetEntityPlayerInteractCallback("armour_rusty_head_1", "ShowStatue", true);

//Enteties//
SetEntityActive("level_wood_1", false);
SetEntityActive("deformed_man_1", false);
}

(This is only the OnStart() part of the code)
The problem is: the entity is still active when I start the map (which it should not be). I've also tried deactivating it from the Level Editor, this didn't work either. (I've looked for map cache-files, but they are removed)

Please help me
You cannot make the deformed_man entity active/inactive, I had this issue weeks ago when I tried to make a Weeping Angel-like encounter.

I solved this problem using the statues from the ptest folder, those can be de-activated.

I think you could also edit the deformed_man statue to make it de-activable, but I won't help you on that because I don't know anything about it.
(12-27-2013, 12:06 AM)daortir Wrote: [ -> ]You cannot make the deformed_man entity active/inactive, I had this issue weeks ago when I tried to make a Weeping Angel-like encounter.

I solved this problem using the statues from the ptest folder, those can be de-activated.

I think you could also edit the deformed_man statue to make it de-activable, but I won't help you on that because I don't know anything about it.

Thank you so much! This helped alot.
My pleasure. Here have a cookie, it improves everything : >.
If you absolutely need to make the deformed man activate/deactivate-able I would probably look at making a copy of its entity file and changing its type in the model editor, as the cause of the issue is likely that it is of a type that does not support the function.
What type would you use, The Mug ? I am curious about it because I don't know how to do it and I think it might come in handy :3
Well I would find another entity that works with SetEntityActive(), and has the necessary features you need for the entity that needs to be changed. Then I would open it in the modeleditor and look at what type it is.
Then I would make a copy of the problematic entity and change it to be that type and it should work, TADA!
Object subtype static (or any other subtype under object) will allow the object to be activated/deactivated.

Having it as Staticobject - no subtype doesn't allow the entity to be activated/deactivated.
Moved to the right section.
Basically objects of the type StaticProp will always be active, no matter what. Make a copy of the entity for your custom stories folder and change it to Type:Object, SubType: Static. c: