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
Need some brief help.
rybray Offline
Junior Member

Posts: 31
Threads: 9
Joined: Aug 2011
Reputation: 1
#2
RE: Need some brief help.

http://wiki.frictionalgames.com/hpl2/amn..._functions

All script usually has

OnStart() for when you are loading the map
{
}

OnEnter() for when your character enters the map
{
}

OnLeave() for when you leave the map
{
}

Not all functions need go inside those brackets however. You can have a function in between them, but if the function does not reside in brackets you must put void before the function, like this

void SetEntityPlayerInteractCallback(string& asName, string& asCallback, bool abRemoveOnInteraction);

But a function like this will most likely be in OnStart, like this

OnStart()
{
SetEntityPlayerInteractCallback(string& asName, string& asCallback, bool abRemoveOnInteraction);
}

Which coincidentally is the script function you would use to have something happen when you pick up an item. Look at the link above and find out what you put in the (string& asName, string& asCallback, bool abRemoveOnInteraction) section.

Be careful at the string& asCallback part, the name you put here must match the function that occurs when you pick the key up. like....

OnStart()
{
SetEntityPlayerInteractCallback("key", "spawnmonster", true);
}

void spawnmonster(string &in asEntity)
{
What you want to happen.
}

Make sure to take a look at the link at the top of the post, if you haven't already.
09-03-2011, 02:57 PM
Find


Messages In This Thread
Need some brief help. - by PurpelPumpkin - 09-03-2011, 09:34 AM
RE: Need some brief help. - by rybray - 09-03-2011, 02:57 PM
RE: Need some brief help. - by PurpelPumpkin - 09-03-2011, 04:20 PM
RE: Need some brief help. - by PurpelPumpkin - 09-03-2011, 11:32 PM
RE: Need some brief help. - by Selyp - 09-04-2011, 12:38 AM
RE: Need some brief help. - by PurpelPumpkin - 09-04-2011, 10:06 AM
RE: Need some brief help. - by PurpelPumpkin - 09-04-2011, 12:50 PM



Users browsing this thread: 1 Guest(s)