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
How can i separated script commands in Notepad++?
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#2
RE: How can i separated script commands in Notepad++?

You should only have 1 void OnStart(). Try this:

////////////////////////////
// Run first time starting map
void OnStart()
{
SetEntityCallbackFunc("key", "jump");
AddEntityCollideCallback("Player", "script_slam", "func_slam", true, 1);
}

void jump(string &in asEntity, string &in type)
{
SetEntityActive("pig",true);
PlayGuiSound("21/21_scream10.ogg",1.0f);
StartScreenShake(0.5f,2,0,0.25);
}

void func_slam(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("door2", true, true);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare", "Player", 0, false); PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);
GiveSanityDamage(5.0f, true);
}
11-12-2012, 05:42 PM
Find


Messages In This Thread
RE: How can i separated script commands in Notepad++? - by Statyk - 11-12-2012, 05:42 PM



Users browsing this thread: 1 Guest(s)