Frictional Games Forum (read-only)
Entity is NOT supposed to be active - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Entity is NOT supposed to be active (/thread-17231.html)



Entity is NOT supposed to be active - HeadyBoy - 07-24-2012

I've been trying to do something with statues.


You start in one area with a statue and as you move to the next room, the statue is supposed to disappear and look like it's reappearing in the next room.


This isn't happening. It looks as if all of my entities are active at the same time and my triggers aren't working.. anybody know what's up with this? I will post part of my script below. This is really irritating me.


void OnStart()
{
AddEntityCollideCallback("Player","statuefirst","collidestatuefirst",true,1);
AddEntityCollideCallback("Player","statuesecond","collidestatuesecond",true,1);
SetEntityPlayerInteractCallback("firstkey", "collidestatuethird", true);
AddEntityCollideCallback("Player","statuefourth","collidestatuefourth",true,1);
AddEntityCollideCallback("Player","statuefifth","collidestatuefifth",true,1);
SetEntityPlayerInteractCallback("kitchenkey", "collidestatuesixth", true);
SetEntityPlayerInteractCallback("musickey", "collidestatueseventh", true);
SetEntityPlayerInteractCallback("labkey", "collidestatueeighth", true);
SetEntityPlayerInteractCallback("sewer", "collidestatueninth", true);
}


void collidestatuefirst(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("statueman1", false);
SetEntityActive("statueman2", true);
PlaySoundAtEntity("", "10_rock_move.snt", "statueman2", 0, false);
}

void collidestatuesecond(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("statueman2", false);
SetEntityActive("statueman3", true);
PlaySoundAtEntity("", "10_rock_move.snt", "statueman3", 0, false);
}

void collidestatuethird(string &in EntityName, int alState)
{
SetEntityActive("statueman3", false);
SetEntityActive("statueman4", true);
PlaySoundAtEntity("", "10_rock_move.snt", "statueman4", 0, false);
}


and it's just that sort of flow until the end.. but I don't think it's anything to do with my script considering that the statues are all spawned at the beginning. Does anybody have any answers to why my statue entities may not be popping in and out when they should be?


RE: Entity is NOT supposed to be active - Your Computer - 07-24-2012

Change the entity type to Object::Static.


RE: Entity is NOT supposed to be active - HeadyBoy - 07-24-2012

(07-24-2012, 06:19 AM)Your Computer Wrote: Change the entity type to Object::Static.
I am the highlight of noobs everywhere. How do I do that? As there is no static physics option with this entity Blush


RE: Entity is NOT supposed to be active - Your Computer - 07-24-2012

(07-24-2012, 06:27 AM)HeadyBoy Wrote: I am the highlight of noobs everywhere. How do I do that? As there is no static physics option with this entity Blush

Model Editor: Settings: User defined variables.


RE: Entity is NOT supposed to be active - HeadyBoy - 07-24-2012

(07-24-2012, 06:33 AM)Your Computer Wrote:
(07-24-2012, 06:27 AM)HeadyBoy Wrote: I am the highlight of noobs everywhere. How do I do that? As there is no static physics option with this entity Blush

Model Editor: Settings: User defined variables.
Done that I think it works. Now.. this newly saved model is in my files. How would somebody else get this model?


RE: Entity is NOT supposed to be active - Statyk - 07-24-2012

Put the new .ent in your custom story's folder.


RE: Entity is NOT supposed to be active - HeadyBoy - 07-24-2012

Thankyou very much my good sir.