firstly . sorry for my bad english i m ,from hungary!
second
orry for the noob question ,but i am newbie!
For example : i crated a script in 00_test.hps
it looks like this :
////////////////////////////
// Run first time starting map
void OnStart(){
SetEntityCallbackFunc("key", "jump");
}
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);
}
Now i want to add a new script . for example this :
void OnStart()
{
AddEntityCollideCallback("Player", "script_slam", "func_slam", true, 1);
}
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);
}void OnStart()
{
AddEntityCollideCallback("Player", "script_slam", "func_slam", true, 1);
}
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);
}
But i've got an error and it sead " OnStart is the same and the parameters"
Now what can i do and how can i debbuging this ?
Please help me gusy! *-*