Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Entity Spawn problem
ModestWalrus Offline
Junior Member

Posts: 26
Threads: 3
Joined: Jan 2012
Reputation: 0
#1
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
Website Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#2
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
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#3
RE: Entity Spawn problem

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

Tutorials: From Noob to Pro
02-13-2012, 07:33 AM
Website Find
ModestWalrus Offline
Junior Member

Posts: 26
Threads: 3
Joined: Jan 2012
Reputation: 0
#4
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
Website Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#5
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
Find
ModestWalrus Offline
Junior Member

Posts: 26
Threads: 3
Joined: Jan 2012
Reputation: 0
#6
RE: Entity Spawn problem

Okay sweet, thanks a lot.
02-13-2012, 08:50 PM
Website Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#7
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.

Tutorials: From Noob to Pro
02-13-2012, 08:55 PM
Website Find




Users browsing this thread: 2 Guest(s)