Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Gametee


Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
.hps error help
Author Message
Raymond Offline
Member

Posts: 126
Joined: Feb 2011
Reputation: 0
Post: #1
.hps error help

////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
///////////////
////Callbacks
///////////////

void OnStart()
{
AddEntityCollideCallback("Player" , "ScriptArea_1" , "MonsterFunc1" , true , 1);
AddEntityCollideCallback("Player" , "ScriptArea_2" , "Collide_Area1" , true , 1);
AddEntityCollideCallback("Player" , "ScriptArea_3" , "Collide_Area2" , true , 1);
AddEntityCollideCallback("Player" , "ScriptArea_4" , "Collide_Area3" , true , 1);
AddEntityCollideCallback("Player", "InsanityArea_2", "insanity1", true, 1);
AddEntityCollideCallback("Player", "ScriptSpawn01", "ScriptSpawn1", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_5", "Collide_Area4", true, 1);
}
//////////////////////
//////Functions
//////////////////////

void MonsterFunc1(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("ScriptArea_5", true);
}

void Collide_Area1(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("slime_anim_wall_1" , true);
SetEntityActive("slime_anim_wall_2" , true);
SetEntityActive("slime_anim_wall_3 , true);
SetEntityActive("slime_anim_wall_4 , true);
SetEntityActive("slime_anim_wall_1" , true);
SetEntityActive("slime_pile_1" , true);
SetEntityActive("slime_pile_2" , true);
SetEntityActive("slime_pile_3" , true);
SetEntityActive("slime_pile_4" , true);
SetEntityActive("slime_pile_large_4" , true);
SetEntityActive("slime_pile_large_5" , true);
SetEntityActive("SlimeDamageArea_2" , true);
SetEntityActive("SlimeDamageArea_3" , true);
SetEntityActive("SlimeDamageArea_4" , true);
}

void PickedUpNote(string &in entity)
{
SetEntityActive("servant_grunt_2", true);
SetEntityActive("slime_pile_large_2", true);
SetEntityActive("slime_pile_large_1", true);
SetEntityActive("SlimeDamageArea_1", true);
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_21", 10, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_18", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_22", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_27", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_29", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_31", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_33", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_34", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_35", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_36", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_38", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_37", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_34", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_40", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_39", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_41", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_42", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_43", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_44", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_45", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_47", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_46", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_48", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_49", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_50", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_90", 0, "");
}

void insanity1(string &in asParent , string &in asChild , int alState)
{
StartScreenShake(0.5f, 0.01f, 0.1f, 0.02f);
GiveSanityDamage(10.0f, true);
PlayMusic("insanity_baby_cry1.ogg", false, 1.0f, 0.5f, 10, false);
}

void PickedUpKey(string &in entity)
{
SetEntityActive("waterlurker_1", true);
}

void ScriptSpawn01(string &in entity)
{
SetEntityActive("ScriptArea_3", true);
}

void Collide_Area4(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("servant_brute_2" , true);
AddEnemyPatrolNode("servant_brute_2", "PathNodeArea_91", 0, ""); //Make route for enemy!//
AddEnemyPatrolNode("servant_brute_2", "PathNodeArea_92", 0, "");
AddEnemyPatrolNode("servant_brute_2", "PathNodeArea_93", 0, "");
AddEnemyPatrolNode("servant_brute_2", "PathNodeArea_95", 0, "");
AddEnemyPatrolNode("servant_brute_2", "PathNodeArea_94", 0, "");
AddEnemyPatrolNode("servant_brute_2", "PathNodeArea_96", 0, "");
AddEnemyPatrolNode("servant_brute_2", "PathNodeArea_97", 0, "");
AddEnemyPatrolNode("servant_brute_2", "PathNodeArea_98", 0, "");
AddEnemyPatrolNode("servant_brute_2", "PathNodeArea_99", 0, "");
AddEnemyPatrolNode("servant_brute_2", "PathNodeArea_100", 0, "");
AddEnemyPatrolNode("servant_brute_2", "PathNodeArea_101", 0, "");
AddEnemyPatrolNode("servant_brute_2", "PathNodeArea_103", 0, "");
AddEnemyPatrolNode("servant_brute_2", "PathNodeArea_102", 0, "");
}

//////////////////////
/////Note
//////////////////////

void UltimateTruth(string &in asDoor)
{
SetMessage("One World To Another", "UltimateTruth", 0);
}

Another problem, Error says: FATAL ERROR: Could not load script file 'custom_stories/One World To Another/maps/One World To Another.hps'! main (39,20) : ERR : Expected ")" or ","

My .hps is like this (above), it say Expected ")" or ",' , but i don't understand, please help Huh.

One World To Another [DEMO] coming soon.
03-13-2011 06:42 AM
Find all posts by this user Quote this message in a reply
XxItachi09xX Offline
Junior Member

Posts: 16
Joined: Feb 2011
Reputation: 0
Post: #2
RE: .hps error help

(03-13-2011 06:42 AM)Raymond Wrote:  ////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
///////////////
////Callbacks
///////////////

void OnStart()
{
AddEntityCollideCallback("Player" , "ScriptArea_1" , "MonsterFunc1" , true , 1);
AddEntityCollideCallback("Player" , "ScriptArea_2" , "Collide_Area1" , true , 1);
AddEntityCollideCallback("Player" , "ScriptArea_3" , "Collide_Area2" , true , 1);
AddEntityCollideCallback("Player" , "ScriptArea_4" , "Collide_Area3" , true , 1);
AddEntityCollideCallback("Player", "InsanityArea_2", "insanity1", true, 1);
AddEntityCollideCallback("Player", "ScriptSpawn01", "ScriptSpawn1", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_5", "Collide_Area4", true, 1);
}
//////////////////////
//////Functions
//////////////////////

void MonsterFunc1(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("ScriptArea_5", true);
}

void Collide_Area1(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("slime_anim_wall_1" , true);
SetEntityActive("slime_anim_wall_2" , true);
SetEntityActive("slime_anim_wall_3" , true);
SetEntityActive("slime_anim_wall_4" , true);
SetEntityActive("slime_anim_wall_1" , true);
SetEntityActive("slime_pile_1" , true);
SetEntityActive("slime_pile_2" , true);
SetEntityActive("slime_pile_3" , true);
SetEntityActive("slime_pile_4" , true);
SetEntityActive("slime_pile_large_4" , true);
SetEntityActive("slime_pile_large_5" , true);
SetEntityActive("SlimeDamageArea_2" , true);
SetEntityActive("SlimeDamageArea_3" , true);
SetEntityActive("SlimeDamageArea_4" , true);
}

void PickedUpNote(string &in entity)
{
SetEntityActive("servant_grunt_2", true);
SetEntityActive("slime_pile_large_2", true);
SetEntityActive("slime_pile_large_1", true);
SetEntityActive("SlimeDamageArea_1", true);
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_21", 10, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_18", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_22", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_27", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_29", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_31", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_33", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_34", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_35", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_36", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_38", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_37", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_34", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_40", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_39", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_41", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_42", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_43", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_44", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_45", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_47", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_46", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_48", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_49", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_50", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_90", 0, "");
}

void insanity1(string &in asParent , string &in asChild , int alState)
{
StartScreenShake(0.5f, 0.01f, 0.1f, 0.02f);
GiveSanityDamage(10.0f, true);
PlayMusic("insanity_baby_cry1.ogg", false, 1.0f, 0.5f, 10, false);
}

void PickedUpKey(string &in entity)
{
SetEntityActive("waterlurker_1", true);
}

void ScriptSpawn01(string &in entity)
{
SetEntityActive("ScriptArea_3", true);
}

void Collide_Area4(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("servant_brute_2" , true);
AddEnemyPatrolNode("servant_brute_2", "PathNodeArea_91", 0, ""); //Make route for enemy!//
AddEnemyPatrolNode("servant_brute_2", "PathNodeArea_92", 0, "");
AddEnemyPatrolNode("servant_brute_2", "PathNodeArea_93", 0, "");
AddEnemyPatrolNode("servant_brute_2", "PathNodeArea_95", 0, "");
AddEnemyPatrolNode("servant_brute_2", "PathNodeArea_94", 0, "");
AddEnemyPatrolNode("servant_brute_2", "PathNodeArea_96", 0, "");
AddEnemyPatrolNode("servant_brute_2", "PathNodeArea_97", 0, "");
AddEnemyPatrolNode("servant_brute_2", "PathNodeArea_98", 0, "");
AddEnemyPatrolNode("servant_brute_2", "PathNodeArea_99", 0, "");
AddEnemyPatrolNode("servant_brute_2", "PathNodeArea_100", 0, "");
AddEnemyPatrolNode("servant_brute_2", "PathNodeArea_101", 0, "");
AddEnemyPatrolNode("servant_brute_2", "PathNodeArea_103", 0, "");
AddEnemyPatrolNode("servant_brute_2", "PathNodeArea_102", 0, "");
}

//////////////////////
/////Note
//////////////////////

void UltimateTruth(string &in asDoor)
{
SetMessage("One World To Another", "UltimateTruth", 0);
}

Another problem, Error says: FATAL ERROR: Could not load script file 'custom_stories/One World To Another/maps/One World To Another.hps'! main (39,20) : ERR : Expected ")" or ","

My .hps is like this (above), it say Expected ")" or ",' , but i don't understand, please help Huh.

You forgotten the (") . Hope it helps Wink.
03-13-2011 07:01 AM
Find all posts by this user Quote this message in a reply
Raymond Offline
Member

Posts: 126
Joined: Feb 2011
Reputation: 0
Post: #3
RE: .hps error help

Thanks Big Grin.

One World To Another [DEMO] coming soon.
03-13-2011 07:03 AM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)