The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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++?
hecike3 Offline
Junior Member

Posts: 1
Threads: 1
Joined: Nov 2012
Reputation: 0
#1
How can i separated script commands in Notepad++?

firstly . sorry for my bad english i m ,from hungary!
second Confusedorry 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! *-*
11-12-2012, 05:11 PM
Find


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



Users browsing this thread: 1 Guest(s)