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
Hps file doesn't work
Shives Offline
Member

Posts: 154
Threads: 41
Joined: Jan 2012
Reputation: 1
#1
Hps file doesn't work

Hi
When i'm entering the map the game doesn't crash but he doesn't respond to the script.
What I've done wrong?



////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("Player", "Area_1", "Waterlurker", true, 9);
AddEntityCollideCallback("Player", "ScriptArea_1", "Waterlurker_2", true, 9);
AddEntityCollideCallback("Player", "ScriptArea_2", "Waterlurker_3", true, 9);
AddUseItemCallback("", "Hammer", "Gate", "Kaputt", true);
SetEntityConnectionStateChangeCallback("Lever", "hochfahr");
AddEntityCollideCallback("Player", "Levelchanger", "teleport", true, 1);
}
void Waterlurker(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("waterlurker_1", true);
}
void Waterlurker_2(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("waterlurker_2", true);
SetEntityActive("waterlurker_1", false);
}
void Waterlurker_3(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("waterlurker_3", true);
SetEntityActive("waterlurker_2", false);
}
void Kaputt(string &in asItem, string &in asEntity)
{
SetEntityActive("Kaputt", true);
SetEntityActive("Gate", false);
SetEntityActive("Box", false);
PlaySoundAtEntity("", "break_wood_metal_3.snt", "Player", 0, false);
}
void hochfahr(string &in asEntity, int alState)
{
if (alState == 1)
{
SetEntityActive("Gate_2", false);
SetEntityActive("Opened", true);
SetEntityActive("Box_2", false);
return;
}
}
void teleport(string &in asParent, string &in asChild, int alState)
{
ChangeMap("Gang.map", "PlayerStartArea_1", "", "");
}
////////////////////////////
// Run when entering map
void OnEnter()
{

}

////////////////////////////
// Run when leaving map
void OnLeave()
{

My Custom Story
http://www.frictionalgames.com/forum/thread-12587.html

Sorry for bad English


02-11-2012, 12:08 PM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#2
RE: Hps file doesn't work

Have you named the script file the same as the map file? And is it in the same folder?

02-11-2012, 12:19 PM
Find
Shives Offline
Member

Posts: 154
Threads: 41
Joined: Jan 2012
Reputation: 1
#3
RE: Hps file doesn't work

yes
it has the same name

My Custom Story
http://www.frictionalgames.com/forum/thread-12587.html

Sorry for bad English


02-11-2012, 12:26 PM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#4
RE: Hps file doesn't work

AddEntityCollideCallback("Player", "ScriptArea_2", "Waterlurker_3", true, 9);


Instead of 9, put 1


Do that on all of them

02-11-2012, 12:39 PM
Find




Users browsing this thread: 1 Guest(s)