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
Script Help SOLVED Collide function doesn't wanna work
Neelke Offline
Senior Member

Posts: 668
Threads: 82
Joined: Apr 2013
Reputation: 26
#1
SOLVED Collide function doesn't wanna work

For some reason, my collide function isn't functioning properly. It's made by string variables to check if the correct things are pressed and so on.

void ButtonPress(string &in asEntity)
{
    //Check which button that is currently being pressed
    if(asEntity == "button_simple_1")
    {
        SetLocalVarString("Brother", "CurrentTeleportCutscene");
        
        //Don't want the other buttons to be clicked at this point
        for(int i=0;i<5;i++) SetEntityInteractionDisabled("button_simple_" + i, true);
    }

void CollideChangeMap(string &in asParent, string &in asChild, int alState)
{
    string sMapChange = GetLocalVarString("CurrentTeleportCutscene");
    
    if(sMapChange == "Brother"){
        ChangeMap("nomapyet.map", "TeleEnter_1", "", "");
    }
}

void OnStart()
{
     AddEntityCollideCallback("Player", "AreaChangeMap", "CollideChangeMap", true, 1);
}

I have checked the name of the area and it is correct. Still doesn't wanna work. Just making sure here, is there anything wrong in the script?

Derp.
(This post was last modified: 04-06-2014, 01:03 PM by Neelke.)
04-06-2014, 12:35 PM
Find


Messages In This Thread
SOLVED Collide function doesn't wanna work - by Neelke - 04-06-2014, 12:35 PM



Users browsing this thread: 1 Guest(s)