Frictional Games Forum (read-only)

Full Version: Entity Spawn problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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 ()
{
}
Have you deactivated him in the level editor? Click on him and make sure to untick "Active".
The entity is probably of type StaticProp. These kinds of entities cannot be disabled.
(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?
(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.

Okay sweet, thanks a lot.
(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.