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
Level Editor Help Need help...
jessehmusic Offline
Senior Member

Posts: 423
Threads: 102
Joined: Dec 2011
Reputation: 8
#16
RE: Need help...

(03-08-2012, 09:30 AM)Pyöveli Wrote:
(03-08-2012, 09:13 AM)jessehmusic Wrote:
(03-07-2012, 10:25 PM)Pyöveli Wrote:
(03-07-2012, 09:59 PM)jessehmusic Wrote:
(03-06-2012, 05:28 PM)Nevicar Wrote: Last time I checked, if statements need a pair of brackets for their own statements.


i.e.


void Ghost_Horror_Ghost_Event1(string &in asParent, string &in asChild, int alState)
{
if(HasItem("Scary_key") == true)//false//
{
AddTimer("T4", 1.0f, "Timer_4");
AddTimer("T5", 1.5f, "Timer_5");
}

Maybe that?
noting works :/

void OnStart()
{
AddEntityCollideCallback(" ", "Ghost_Start_Area_Event", "Ghost_Horror_Ghost_Event1", true, 1);

}



void Ghost_Horror_Ghost_Event1(string &in asParent, string &in asChild, int alState)
{
if(HasItem("Scary_key") == true)//false//
{
AddTimer("T4", 1.0f, "Timer_4");
AddTimer("T5", 1.5f, "Timer_5");
}
}
void Timer_4(string &in Timer)
{
SetEntityActive("alexander_3", true);
PlayGuiSound("enemy_hallucination_disappear.snt", 15.5f);
}

void Timer_5(string &in Timer)
{
SetEntityActive("alexander_3", false);
PlaySoundAtEntity("", "react_pant.snt", "Player", 0.0f, false);
}
To that //DO STUFF// you just add a function that does the thing what you want it to do when you enter the area with the key. like:
if(HasItem("key_study"){
GiveSanityBoostSmall();
}
(that gives you a sanityboost when you enter the area with the key named "key_study".)

EDIT: The script function is [bool HasItem(string& asName);]

have you tried using it this way?
[void OnStart()
{
AddEntityCollideCallback(" ", "Ghost_Start_Area_Event", "Ghost_Horror_Ghost_Event1", true, 1);

}



void Ghost_Horror_Ghost_Event1(string &in asParent, string &in asChild, int alState)
{
if(HasItem("Scary_key"))
{
AddTimer("T4", 1.0f, "Timer_4");
AddTimer("T5", 1.5f, "Timer_5");
}
}
void Timer_4(string &in Timer)
{
SetEntityActive("alexander_3", true);
PlayGuiSound("enemy_hallucination_disappear.snt", 15.5f);
}

void Timer_5(string &in Timer)
{
SetEntityActive("alexander_3", false);
PlaySoundAtEntity("", "react_pant.snt", "Player", 0.0f, false);
}]
Well im confused realy much about this "IF" can you make the script for the area to work ?
Okay...

void OnStart()
{
AddEntityCollideCallback("Player", "TestArea_1", "TestFunc", true, 1);
}


void TestFunc(string &in asParent,string &in asChild, int alState)
{
If(HasItem("Key_test"))GiveSanityBoostSmall();

}
Still dosnt work :7

http://www.moddb.com/mods/jessehmusic - Hospital of horror , WIP
03-09-2012, 07:57 PM
Website Find


Messages In This Thread
Need help... - by jessehmusic - 03-05-2012, 04:20 PM
RE: Need help... - by Red - 03-05-2012, 05:20 PM
RE: Need help... - by jessehmusic - 03-05-2012, 05:59 PM
RE: Need help... - by Red - 03-05-2012, 07:29 PM
RE: Need help... - by Strembitsky - 03-05-2012, 07:35 PM
RE: Need help... - by jessehmusic - 03-05-2012, 09:17 PM
RE: Need help... - by jessehmusic - 03-06-2012, 07:06 AM
RE: Need help... - by Datguy5 - 03-06-2012, 04:53 PM
RE: Need help... - by jessehmusic - 03-06-2012, 05:21 PM
RE: Need help... - by Nevicar - 03-06-2012, 05:28 PM
RE: Need help... - by jessehmusic - 03-07-2012, 09:59 PM
RE: Need help... - by Red - 03-07-2012, 10:25 PM
RE: Need help... - by jessehmusic - 03-08-2012, 09:13 AM
RE: Need help... - by Red - 03-08-2012, 09:30 AM
RE: Need help... - by jessehmusic - 03-09-2012, 07:55 AM
RE: Need help... - by jessehmusic - 03-09-2012, 07:57 PM
RE: Need help... - by Red - 03-11-2012, 03:18 PM
RE: Need help... - by Strembitsky - 03-11-2012, 03:34 PM
RE: Need help... - by jessehmusic - 03-15-2012, 11:20 AM



Users browsing this thread: 2 Guest(s)