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
Player-Area collision not working?
Melamoto Offline
Junior Member

Posts: 4
Threads: 2
Joined: Apr 2011
Reputation: 0
#1
Player-Area collision not working?

In a Custom Story I am making, I have an event that is supposed to happen once when the player leaves a set area. The area is a script area, called "SpawnEntranceArea", and the code looks like this:

void EnterSpawnEntranceArea(string &in asParent, string &in asChild, int alState)
{
    SetSwingDoorLocked("PlayerSpawnDoor",false,false);
    AddPropImpulse("PlayerSpawnDoor", 0.0f, -5.0f, 0.0f, "World");
}

...

void OnStart()
{
//Other Startup functions
    AddEntityCollideCallback("Player", "SpawnEntranceArea", "EnterSpawnEntranceArea", true, -1);    
}

But when I try testing it, nothing happens. I have tried various changes, such as making the event repeatable, allowing it to happen on entering and exiting the area, and setting the result of the function to something basic/mundane (Like giving the player a Tinderbox), but nothing still happens. I've checked this against code in the official maps, and see no noticeable difference. Help anyone?
(This post was last modified: 04-12-2011, 06:01 PM by Melamoto.)
04-12-2011, 05:40 PM
Find
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#2
RE: Player-Area collision not working?

Check your maps folder and delete the map cache file if there is one. You might be loading up an old version of the map without the area.

If that's not it, check capitalization and spelling of the trigger area, the functions, etc.

Other than that I don't know what it might be.

04-12-2011, 08:54 PM
Find
jens Offline
Frictional Games

Posts: 4,093
Threads: 199
Joined: Apr 2006
Reputation: 202
#3
RE: Player-Area collision not working?

Here are instructions on extra configuration for when you are developing,
http://www.frictionalgames.com/forum/thread-4822.html
04-12-2011, 09:00 PM
Website Find




Users browsing this thread: 1 Guest(s)