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
HPL level editor Need help now!
Fanstetic Offline
Junior Member

Posts: 8
Threads: 2
Joined: Aug 2012
Reputation: 0
#1
HPL level editor Need help now!

Hello, I'm having a scripting problem, basically I have a monster spawning in one spot using a playerstart and a script that you walk through, I wanted to make another one but it keeps spawning at the wrong playerstart. Here is the script

void OnStart()
{
SetEntityConnectionStateChangeCallback("lever", "unlockdoor");
AddEntityCollideCallback("Player", "script_slam", "func_slam", true, 1);
AddEntityCollideCallback("Player","start","monster",true,1);
AddEntityCollideCallback("grunt","stop","monsterend",true,1);
AddEntityCollideCallback("Player","start2","monster",true,1);
}

void unlockdoor(string &in asEntity, int alState) {
if(GetLeverState("lever")==1){ SetSwingDoorLocked("door", false, true);
}
}

void func_slam(string &in asParent, string &in asChild, int alState)
{
SetPropHealth("door1", 0.0f);


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 monster(string &in asParent, string &in asChild, int alstate){
SetEntityActive("grunt",true);
AddEnemyPatrolNode("grunt","node",0,"");
}

void monsterend(string &in asParent, string &in asChild, int alstate){
SetEntityActive("grunt",false);
}

void monster2(string &in asParent, string &in asChild, int alstate){
SetEntityActive("crawler",true);
AddEnemyPatrolNode("crawler","node2",0,"");
}

Please note I'm very new so if you notice any fails, anything I am doing wrong please point it out. Thanks.
08-24-2012, 08:36 AM
Find


Messages In This Thread
HPL level editor Need help now! - by Fanstetic - 08-24-2012, 08:36 AM
RE: HPL level editor Need help now! - by Adny - 08-24-2012, 08:45 AM



Users browsing this thread: 1 Guest(s)