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
Lizard Offline
Member

Posts: 174
Threads: 23
Joined: Jul 2012
Reputation: 5
#3
RE: Collide function doesn't wanna work

(04-06-2014, 12:35 PM)Neelke Wrote: 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?

Your void ButtonPress isnt close correctly. You're missing a }

CURRENT PROJECT:
A Fathers Secret == Just started
(This post was last modified: 04-06-2014, 12:46 PM by Lizard.)
04-06-2014, 12:45 PM
Find


Messages In This Thread
RE: Collide function doesn't wanna work - by Lizard - 04-06-2014, 12:45 PM



Users browsing this thread: 1 Guest(s)