Frictional Games Forum (read-only)
Entity Spawn problem - 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 Spawn problem (/thread-13302.html)



Entity Spawn problem - ModestWalrus - 02-13-2012

Im trying to make a statue spawn when player collides with "hallway1" but he spawns when player spawns, not when colliding.

Please help


void OnEnter ()
{
AddEntityCollideCallback("Player", "hallway1", "statuemanspawns", true, 1);
}
void statuemanspawns(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("statueman1", true);
PlaySoundAtEntity("", "react_breath.sfn", "Player", 0.5, false);
StartPlayerLookAt("statueman1", 15, 15, "");
AddTimer("", 1.0f, "Stoplooking");
}
void Stoplooking(string &in asTimer)
{
StopPlayerLookAt();
}
//-------------------------------------------------------
void OnLeave ()
{
}


RE: Entity Spawn problem - flamez3 - 02-13-2012

Have you deactivated him in the level editor? Click on him and make sure to untick "Active".


RE: Entity Spawn problem - Your Computer - 02-13-2012

The entity is probably of type StaticProp. These kinds of entities cannot be disabled.


RE: Entity Spawn problem - ModestWalrus - 02-13-2012

(02-13-2012, 07:33 AM)Your Computer Wrote: The entity is probably of type StaticProp. These kinds of entities cannot be disabled.
The statue is in the entities tab, can those still be static?


RE: Entity Spawn problem - flamez3 - 02-13-2012

(02-13-2012, 12:32 PM)ModestWalrus Wrote:
(02-13-2012, 07:33 AM)Your Computer Wrote: The entity is probably of type StaticProp. These kinds of entities cannot be disabled.
The statue is in the entities tab, can those still be static?
No but some entities cannot be deactivated. Trial and error as to which; I know tables and sofas can't.




RE: Entity Spawn problem - ModestWalrus - 02-13-2012

Okay sweet, thanks a lot.


RE: Entity Spawn problem - Your Computer - 02-13-2012

(02-13-2012, 12:32 PM)ModestWalrus Wrote: The statue is in the entities tab, can those still be static?

There are two types of static: StaticProp and Object::Static. The latter can be disabled.