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
Beginner asking for some help.
CarnivorousJelly Offline
Posting Freak

Posts: 1,196
Threads: 41
Joined: Dec 2012
Reputation: 80
#7
RE: Asking for some help with the sound files !

Yes, you should :) Use it like this:

AddEntityCollideCallback(string& asParentName, string& asChildName, string& asFunction, bool abDeleteOnCollide, int alStates);

string& asParentName: the main object - in this case, it's "Player"
string& asChildName: the thing being collided with - in this case, it's whatever you called the area
string& asFunction: the script you're calling
bool abDeleteOnCollide: true or false, it wants to know if the function should occur every time you collide with the area
int alStates: when the collision starts; on entering the area (1), on leaving the area (-1) or both (0)

The program is case-sensitive, so watch for capitals, and make sure you use quotation marks where it says string, or the script won't work!


I should add an example:
void OnStart()
{
AddEntityCollideCallback("Player", "area_monster", "script_ahhh", true, 0);
//The player is colliding with area_monster to trigger a script later in the file, which is called script_monster
//It will be deleted after the player triggers it, so it won't happen again
// The script will be triggered when the player enters or leaves the area
}

void script_ahhh(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("monster_grunt_1", true);
//This sets a pre-determined grunt model into existence in the player's world
}

Also, the lines with // in front of them are just comments (me explaining stuff)

[Image: quote_by_rueppells_fox-d9ciupp.png]
(This post was last modified: 09-26-2013, 05:58 PM by CarnivorousJelly.)
09-26-2013, 02:00 AM
Find


Messages In This Thread
Beginner asking for some help. - by daortir - 09-25-2013, 09:38 PM
RE: Asking for some help with the sound files ! - by CarnivorousJelly - 09-26-2013, 02:00 AM
RE: Beginner asking for some help. - by daortir - 09-26-2013, 03:50 PM
RE: Beginner asking for some help. - by daortir - 09-26-2013, 06:08 PM
RE: Beginner asking for some help. - by daortir - 09-27-2013, 09:35 PM
RE: Beginner asking for some help. - by daortir - 09-27-2013, 11:44 PM
RE: Beginner asking for some help. - by daortir - 09-30-2013, 10:17 AM
RE: Beginner asking for some help. - by daortir - 09-30-2013, 06:24 PM
RE: Beginner asking for some help. - by Kreekakon - 09-30-2013, 06:38 PM
RE: Beginner asking for some help. - by daortir - 10-06-2013, 07:33 PM
RE: Beginner asking for some help. - by daortir - 10-19-2013, 01:07 PM
RE: Beginner asking for some help. - by Kreekakon - 10-19-2013, 01:11 PM
RE: Beginner asking for some help. - by daortir - 10-19-2013, 01:18 PM
RE: Beginner asking for some help. - by Kreekakon - 10-19-2013, 01:25 PM
RE: Beginner asking for some help. - by daortir - 10-21-2013, 11:39 AM
RE: Beginner asking for some help. - by daortir - 10-21-2013, 06:07 PM
RE: Beginner asking for some help. - by daortir - 10-22-2013, 06:31 PM



Users browsing this thread: 1 Guest(s)