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?
No Author Offline
Posting Freak

Posts: 962
Threads: 10
Joined: Jun 2012
Reputation: 13
#11
RE: Script order?

I can't help you until I understand the script. Or at least tell us what you want to do with the script.

(03-10-2013, 11:44 AM)ZereboO Wrote: Try do it like this.
PHP Code: (Select All)
void OnStart()
{
AddEntityCollideCallback("player" "Scriptarea_1" "FunctionName" true 1);
AddUseItemCallback("""key_2""EXAMPLE_DOOR""FUNCTION"true);
}

void FUNCTION(string &in asItemstring &in asEntity)
{
SetSwingDoorLocked(asEntityfalsetrue);
PlaySoundAtEntity("""unlock_door"asEntity0false);
RemoveItem(asItem);
AddEntityCollideCallback("Player""Message_1""Message1"true1);


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

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

void OnLeave()
{



Not sure if he wants the script to be like that. But a real script looks like this.

[Image: the-cabin-in-the-woods-masked-people.jpg]
(This post was last modified: 03-10-2013, 11:52 AM by No Author.)
03-10-2013, 11:49 AM
Find
mrsomeepicrandomguy Offline
Member

Posts: 74
Threads: 15
Joined: Feb 2013
Reputation: 0
#12
RE: Script order?

(03-10-2013, 11:49 AM)No Author Wrote: I can't help you until I understand the script. Or at least tell us what you want to do with the script.

(03-10-2013, 11:44 AM)ZereboO Wrote: Try do it like this.
PHP Code: (Select All)
void OnStart()
{
AddEntityCollideCallback("player" "Scriptarea_1" "FunctionName" true 1);
AddUseItemCallback("""key_2""EXAMPLE_DOOR""FUNCTION"true);
}

void FUNCTION(string &in asItemstring &in asEntity)
{
SetSwingDoorLocked(asEntityfalsetrue);
PlaySoundAtEntity("""unlock_door"asEntity0false);
RemoveItem(asItem);
AddEntityCollideCallback("Player""Message_1""Message1"true1);


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

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

void OnLeave()
{



Not sure if he wants the script to be like that. But a real script looks like this.
I Fuc**d up! Thank you for the help!
{
AddEntityCollideCallback("player" , "Scriptarea_1" , "FunctionName" , true , 1);
AddUseItemCallback("", "key_2", "EXAMPLE_DOOR", "FUNCTION", true);
}
It should be like that, i have that on the other maps.. im a retard: thank you!
03-10-2013, 11:55 AM
Find




Users browsing this thread: 1 Guest(s)