Frictional Games Forum (read-only)

Full Version: Entity is NOT supposed to be active
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?
Change the entity type to Object::Static.
(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
(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.
(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?
Put the new .ent in your custom story's folder.
Thankyou very much my good sir.