ModestWalrus
Junior Member
Posts: 23
Joined: Jan 2012
Reputation: 0
|
Entity Spawn problem
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 ()
{
}
|
|
| 02-13-2012 05:50 AM |
|
flamez3
Posting Freak
Posts: 1,320
Joined: Apr 2011
Reputation: 57
|
RE: Entity Spawn problem
Have you deactivated him in the level editor? Click on him and make sure to untick "Active".
|
|
| 02-13-2012 06:53 AM |
|
Your Computer
SCAN ME!
Posts: 3,231
Joined: Jul 2011
Reputation: 215
|
RE: Entity Spawn problem
The entity is probably of type StaticProp. These kinds of entities cannot be disabled.
|
|
| 02-13-2012 07:33 AM |
|
ModestWalrus
Junior Member
Posts: 23
Joined: Jan 2012
Reputation: 0
|
RE: Entity Spawn problem
(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 |
|
flamez3
Posting Freak
Posts: 1,320
Joined: Apr 2011
Reputation: 57
|
RE: Entity Spawn problem
(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.
|
|
| 02-13-2012 12:43 PM |
|
ModestWalrus
Junior Member
Posts: 23
Joined: Jan 2012
Reputation: 0
|
RE: Entity Spawn problem
Okay sweet, thanks a lot.
|
|
| 02-13-2012 08:50 PM |
|
Your Computer
SCAN ME!
Posts: 3,231
Joined: Jul 2011
Reputation: 215
|
RE: Entity Spawn problem
(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.
|
|
| 02-13-2012 08:55 PM |
|