just a regular key-to-door script, but if i want to put another door script that is just the same, then what do i need to write between these so the game understands that its two different script?? do i need to write ''void..'' and then what?? plz help.
it is for amnesia. and yes i have renamed the doornames and all that, i just need help with this, and this is not just for especially this script, but for all.
<----then do i need to write something special arround this line?? like {} or something like that to hold the two appart? cause i have tried to just start at the line beneath but then the game says :unexpected.. blabla and then ''{''?? how do i write them two next to each other?
Hey ive got a similar problem and its really starting to piss me off. ive already done those doors and keys correctly and they work fine, but what do i put after this:
Can Someone help me ?!
i need these two scripts to be in the same file
ive seperated the scripts with this V
----------------------------------------------------------------------
void OnStart()
{
AddEntityCollideCallback("Player", "Jumpscare_1", "Jump1", true, 1);
(06-14-2013, 09:15 PM)5BitHero Wrote: Can Someone help me ?!
i need these two scripts to be in the same file
ive seperated the scripts with this V
----------------------------------------------------------------------
void OnStart()
{
AddEntityCollideCallback("Player", "Jumpscare_1", "Jump1", true, 1);
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);
}
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.)