The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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


Messages In This Thread
Player-Area collision not working? - by Melamoto - 04-12-2011, 05:40 PM
RE: Player-Area collision not working? - by jens - 04-12-2011, 09:00 PM



Users browsing this thread: 1 Guest(s)