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
multiple script problem!!!
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#10
RE: multiple script problem!!!

void OnStart()
{
    AddEntityCollideCallback("Player", "Jumpscare_1", "Jump1", true, 1);
    AddUseItemCallback("", "Key", "Door", "UseKeyOnDoor", true); //You can't have this in another OnStart(). Just put the second parameter in the OnStart() to the first one.
}

void Jump1(string &in asParent, string &in asChild, int alState)
{  
    PlaySoundAtEntity("", "21_intro_scream.snt", "bro_1", 0, false);
    SetEntityActive("bro_1", true);
        AddTimer("", 1, "scared"); //No need to add .0 if it's 1, 2, 3 and so on.
}

void scared(string &in asTimer)
{
    PlaySoundAtEntity("", "21_scream.snt", "Player", 0, false); //You have the wrong extension and wrong file name.
    SetEntityActive("bro_1", false);
}

void UseKeyOnDoor(string &in asItem, string &in asEntity)
{
        SetSwingDoorLocked(asEntity, false, true);
        PlaySoundAtEntity("", "unlock_door.snt", asEntity, 0, false);
        RemoveItem(asItem);
}

Y U BUMP THRED?!

Anyway, here's the fixed script. Anything wrong is pinpointed in the script itself.

EDIT:
After re-reading it, it looks like you're going to make a dead body lunge to the Player. Please don't do that. Most people here doesn't like the "Flying Naked Guy" or "Flying Jesus".

"Veni, vidi, vici."
"I came, I saw, I conquered."
(This post was last modified: 06-15-2013, 02:27 AM by PutraenusAlivius.)
06-15-2013, 02:23 AM
Find


Messages In This Thread
multiple script problem!!! - by muminmuffin - 02-12-2011, 10:32 PM
RE: multiple script problem!!! - by Urkle - 02-12-2011, 10:40 PM
RE: multiple script problem!!! - by muminmuffin - 02-12-2011, 10:46 PM
RE: multiple script problem!!! - by Oscar House - 02-12-2011, 10:56 PM
RE: multiple script problem!!! - by muminmuffin - 02-12-2011, 11:02 PM
RE: multiple script problem!!! - by Fireintex - 11-09-2011, 12:01 AM
RE: multiple script problem!!! - by Tanshaydar - 11-09-2011, 05:38 AM
RE: multiple script problem!!! - by 5BitHero - 06-14-2013, 09:15 PM
RE: multiple script problem!!! - by PutraenusAlivius - 06-15-2013, 02:23 AM



Users browsing this thread: 1 Guest(s)