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
collide with scriptarea not working
Obsolete Offline
Junior Member

Posts: 5
Threads: 3
Joined: Jul 2015
Reputation: 0
#1
collide with scriptarea not working

Hi,

I was wondering if anyone could help me with a problem in my script file. I wanted to add a collidecallback between the player and a scriptarea that results in the players death. However, after all my hard work. Testing it didn't give promising results. When the player interacts with the scriptarea nothing happens! Can somebody help me out? here is my script:

/////SOME EXPLANATION: 

upon entering the area, the screen should fade out, the player shouldn't be in control anymore, and a timer is added which ultimately scripts for the dead of the player. But nothing happens. I've already checked the name of the scriptarea in the .map file, and that is correct.

There are a whole bunch of other things in this script file that I removed, like multiple collidecallbacks, teleportarea's, interactcallbacks etc. on the start of the map, they all work fine. But for now they are removed to not make this an endless post of scripttext.//////////

void OnStart()


AddEntityCollideCallback("Player", "AreaDrown", "DrownDeath", false, 1);
}



void Drowndeath(string &in asParent, string &in asChild, int alState)
{
SetPlayerActive(false);
FadeOut(1);
AddTimer("Deathtimer", 1.5, "YourDeath");
}

void YourDeath(string &in asTimer)
{
SetDeathHint("DeadHints", "Drowned");
DisableDeathStartSound();
AddPlayerHealth(-200);

}
04-21-2020, 09:57 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#2
RE: collide with scriptarea not working

You have inconsistent casing for "DrownDeath". Your function is named "Drowndeath".

Edit: I see you got your answer in the other thread you posted. https://www.frictionalgames.com/forum/thread-56766.html

I'm closing this one.

(This post was last modified: 04-23-2020, 01:33 AM by Mudbill.)
04-23-2020, 01:30 AM
Find




Users browsing this thread: 1 Guest(s)