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
Just need some help scripting, im a beginner
triadtimes Offline
Senior Member

Posts: 508
Threads: 16
Joined: Jan 2011
Reputation: 21
#2
RE: Just need some help scripting, im a beginner

The way I did it awhile back was this:

In the OnStart I had this:
AddEntityCollideCallback("Player", "Area1", "FunctionName", false, 1);

And the actual function looked like this:
void FunctionName(string &in asParent, string &in asChild, int alState)
{
    if(HasItem("Item1") == true)
    {
        //DO STUFF HERE
    }
}

What would happen is the function would trigger every time the Player walks past but a certain action wouldn't be taken until the Player has Item1. (Depending on the action you may also need to put a variable in to stop it from happening more than once.)

(This post was last modified: 05-26-2011, 05:02 PM by triadtimes.)
05-26-2011, 04:56 AM
Find


Messages In This Thread
RE: Just need some help scripting, im a beginner - by triadtimes - 05-26-2011, 04:56 AM



Users browsing this thread: 1 Guest(s)