Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Entity Spawn problem
Author Message
ModestWalrus Offline
Junior Member

Posts: 23
Joined: Jan 2012
Reputation: 0
Post: #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
Visit this user's website Find all posts by this user Quote this message in a reply
flamez3 Offline
Posting Freak

Posts: 1,320
Joined: Apr 2011
Reputation: 57
Post: #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 all posts by this user Quote this message in a reply
Your Computer Offline
SCAN ME!

Posts: 3,231
Joined: Jul 2011
Reputation: 215
Post: #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
Visit this user's website Find all posts by this user Quote this message in a reply
ModestWalrus Offline
Junior Member

Posts: 23
Joined: Jan 2012
Reputation: 0
Post: #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
Visit this user's website Find all posts by this user Quote this message in a reply
flamez3 Offline
Posting Freak

Posts: 1,320
Joined: Apr 2011
Reputation: 57
Post: #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 all posts by this user Quote this message in a reply
ModestWalrus Offline
Junior Member

Posts: 23
Joined: Jan 2012
Reputation: 0
Post: #6
RE: Entity Spawn problem
Okay sweet, thanks a lot.
02-13-2012 08:50 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Your Computer Offline
SCAN ME!

Posts: 3,231
Joined: Jul 2011
Reputation: 215
Post: #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
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)