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

Posts: 174
Threads: 23
Joined: Jul 2012
Reputation: 5
#10
RE: Script order?

Try do it like this.

void OnStart()
{
AddEntityCollideCallback("player" , "Scriptarea_1" , "FunctionName" , true , 1);
AddUseItemCallback("", "key_2", "EXAMPLE_DOOR", "FUNCTION", true);
}

void FUNCTION(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(asEntity, false, true);
PlaySoundAtEntity("", "unlock_door", asEntity, 0, false);
RemoveItem(asItem);
AddEntityCollideCallback("Player", "Message_1", "Message1", true, 1);
}

void FunctionName(string &in asParent , string &in asChild , int alState)
{
PlaySoundAtEntity("", "unlock_door", "Scriptarea_1", 0, false);
}

void Message1(string &in asChild, string &in asParent, int alState)
{
SetMessage("Messages", "Popup4", 6); //This stands for ("Name of category", "Name of entry", time to be displayed on the screen);
}

void OnLeave()
{

}

CURRENT PROJECT:
A Fathers Secret == Just started
(This post was last modified: 03-10-2013, 11:45 AM by Lizard.)
03-10-2013, 11:44 AM
Find


Messages In This Thread
Script order? - by mrsomeepicrandomguy - 03-10-2013, 10:26 AM
RE: Script order? - by OriginalUsername - 03-10-2013, 10:33 AM
RE: Script order? - by mrsomeepicrandomguy - 03-10-2013, 10:43 AM
RE: Script order? - by No Author - 03-10-2013, 10:47 AM
RE: Script order? - by mrsomeepicrandomguy - 03-10-2013, 10:51 AM
RE: Script order? - by No Author - 03-10-2013, 11:49 AM
RE: Script order? - by mrsomeepicrandomguy - 03-10-2013, 11:55 AM
RE: Script order? - by No Author - 03-10-2013, 11:10 AM
RE: Script order? - by mrsomeepicrandomguy - 03-10-2013, 11:16 AM
RE: Script order? - by No Author - 03-10-2013, 11:27 AM
RE: Script order? - by mrsomeepicrandomguy - 03-10-2013, 11:29 AM
RE: Script order? - by Lizard - 03-10-2013, 11:44 AM



Users browsing this thread: 5 Guest(s)