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


Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Game Problems
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#11
RE: Game Problems

http://wiki.frictionalgames.com/hpl2/tut...ipt/events
http://wiki.frictionalgames.com/hpl2/tut...iferorange


I think you will like these links ^^

The first link, the second script, is the exploding door.

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
12-07-2012, 02:47 PM
Find
Fishnugget Offline
Member

Posts: 72
Threads: 6
Joined: Aug 2012
Reputation: 1
#12
RE: Game Problems

Hmmm, thanks.....
But in not one links says what i have to write that the door explodes at an area
The Tutorial epxplains how to make the door explodes but not in wich time
12-07-2012, 03:48 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#13
RE: Game Problems

Click the search button and search for something like: Collide

Trying is the first step to success.
12-07-2012, 03:51 PM
Find
Fishnugget Offline
Member

Posts: 72
Threads: 6
Joined: Aug 2012
Reputation: 1
#14
RE: Game Problems

Which custom story includes the justine monster?
I need it^^
12-07-2012, 06:19 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#15
RE: Game Problems

How about installing the free 1.2 patch?

Trying is the first step to success.
12-07-2012, 07:52 PM
Find
Fishnugget Offline
Member

Posts: 72
Threads: 6
Joined: Aug 2012
Reputation: 1
#16
RE: Game Problems

Yes, sorry I already do it^^'

My problem is: A function with the same name and paramer already exist, but i cant find it.


void OnStart()
{
AddEntityCollideCallback("Player" , "ScriptArea_1" , "Boots" , true , 1);
AddEntityCollideCallback("Player", "ScriptArea_2", "Schritte", true, 1);
AddUseItemCallback("", "BonusSchluessel", "BonusTuer", "UsedKeyOnDoor", true);
AddEntityCollideCallback("Player" , "ScriptArea_3" , "Slenderan" , true , 1);
AddEntityCollideCallback("Player", "ScriptArea_4", "Slenderaus", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_5", "Turweg", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_6", "Turweg2", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_7", "Turweg3", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_8", "Slenderan2", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_9", "Slenderaus1", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_10", "Slenderaus2", true, 1);
SetEntityCallbackFunc("glass_container_mix_done_1", "OnPickup1");
AddUseItemCallback("", "key_tomb_rusty_1", "level_engine_1", "UsedKeyOnDoor", true);
}

void Boots(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("boots_idle_1", true);
AddEnemyPatrolNode("boots_idle_1", "PathNodeArea_1", 0, "Idle");
AddEnemyPatrolNode("boots_idle_1", "PathNodeArea_2", 0, "Idle");
AddEnemyPatrolNode("boots_idle_1", "PathNodeArea_3", 0, "Idle");
AddEnemyPatrolNode("boots_idle_1", "PathNodeArea_4", 0, "Idle");
}

void Schritte(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "schritt.snt", "Player", 0, false);
GiveSanityDamage(5.0f, true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("BonusTuer", false, false);
PlaySoundAtEntity("", "unlock_BonusSchluessel.snt", "BonusTuer", 0, false);
RemoveItem("BonusSchluessel");
AddDebugMessage("KeyOnDoor", false);
}

void Slenderan(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "slen.snt", "Player", 0, false);
SetEntityActive("slenderman9_1", true);
AddEnemyPatrolNode("slenderman9_1", "PathNodeArea_5", 0, "Idle");
AddEnemyPatrolNode("slenderman9_1", "PathNodeArea_6", 0, "Idle");
}

void Slenderaus(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "reaant.snt", "Player", 0, false);
GiveSanityDamage(5.0f, true);
SetEntityActive("slenderman9_1", false);
}

void Turweg(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "close_gate.snt", "Player", 0, false);
PlaySoundAtEntity("", "00_laugh.snt", "Player", 0, false);
GiveSanityDamage(5.0f, true);
SetEntityActive("level_hub_2", true);
SetEntityActive("level_hub_1", false);
}

void Turweg2(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "close_gate.snt", "Player", 0, false);
GiveSanityDamage(5.0f, true);
SetEntityActive("level_hub_3", true);
SetEntityActive("level_hub_2", false);
}

void Turweg3(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "close_gate.snt", "Player", 0, false);
GiveSanityDamage(5.0f, true);
SetEntityActive("level_hub_3", false);
}

void Slenderan2(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "slen.snt", "Player", 0, false);
GiveSanityDamage(5.0f, true);
SetEntityActive("slenderman9_2", true);
SetEntityActive("ScriptArea_10", true);
}

void Slenderaus1(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "slen.snt", "Player", 0, false);
GiveSanityDamage(5.0f, true);
SetEntityActive("slenderman9_2", false);
SetEntityActive("ScriptArea_10", false);
}

void Slenderaus2(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "slen.snt", "Player", 0, false);
GiveSanityDamage(5.0f, true);
SetEntityActive("slenderman9_2", false);
SetEntityActive("ScriptArea_9", false);
}

void OnPickup1(string &in asEntity, string &in type)
{
PlaySoundAtEntity("", "react_pant.snt", "Player", 0, false);
PlaySoundAtEntity("", "00_faint.snt", "Player", 0, false);
GiveSanityDamage(5.0f, true);
SetEntityActive("enemy_suitor_1", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetLevelDoorLocked("level_engine_1", false);
PlaySoundAtEntity("", "unlock_key_tomb_rusty_1.snt", "level_engine_1", 0, false);
RemoveItem("key_tomb_rusty_1");
AddDebugMessage("KeyOnDoor", false);
}



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

}

Can you find it?
12-07-2012, 08:07 PM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#17
RE: Game Problems

Slenderman, eh? Well, anyways: You have "UsedKeyOnDoor" 2 times. The script turns mad when there are two functions called the same, so change the name from the callback and the function.

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
12-07-2012, 08:36 PM
Find
Fishnugget Offline
Member

Posts: 72
Threads: 6
Joined: Aug 2012
Reputation: 1
#18
RE: Game Problems

I need help. I watch a Tut on youtube http://www.youtube.com/watch?v=ocu3DH95kiU
He explains, how to make a door explode at an are. I do the same and this error shows up

Err : no matching signatures to 'OnEnter()'
main (48, 2) Err : Unexpected end of file

I dont get it....again

Thats the script:


void OnStart()
{
AddEntityCollideCallback("Player" , "ScriptArea_1" , "Clown1" , true , 1);
AddEntityCollideCallback("Player" , "ScriptArea_2" , "Clown2" , true , 1);
AddEntityCollideCallback("Player" , "ScriptArea_3" , "Clown3" , true , 1);
AddEntityCollideCallback("Player" , "ScriptArea_1" , "CollideDoorExplode" , true , 1);
}

void Clown1(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Clooni1_1", true);
AddEnemyPatrolNode("Clooni1_1", "PathNodeArea_1", 0, "Idle");
AddEnemyPatrolNode("Clooni1_1", "PathNodeArea_2", 0, "Idle");
AddEnemyPatrolNode("Clooni1_1", "PathNodeArea_3", 0, "Idle");
AddEnemyPatrolNode("Clooni1_1", "PathNodeArea_4", 0, "Idle");
AddEnemyPatrolNode("Clooni1_1", "PathNodeArea_5", 0, "Idle");
}

void Clown2(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Clooni1_3", true);
AddEnemyPatrolNode("Clooni1_3", "PathNodeArea_6", 0, "Idle");
AddEnemyPatrolNode("Clooni1_3", "PathNodeArea_7", 0, "Idle");
AddEnemyPatrolNode("Clooni1_3", "PathNodeArea_8", 0, "Idle");
AddEnemyPatrolNode("Clooni1_3", "PathNodeArea_9", 0, "Idle");
AddEnemyPatrolNode("Clooni1_3", "PathNodeArea_10", 0, "Idle");
}

void Clown3(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Clooni1_2", true);
AddEnemyPatrolNode("Clooni1_2", "PathNodeArea_11", 0, "Idle");
AddEnemyPatrolNode("Clooni1_2", "PathNodeArea_12", 0, "Idle");
}

void CollideDoorExplode(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("castle_1", false);
SetEntityActive("castle_broken_1", true);
CreateParticleSystemAtEntity("", "ps_break_wood.ps", "DoorExplodeParticle", false);
PlaySoundAtEntity("", "break_wood.snt", "DoorExplodeParticle", 0, false);

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

}
12-08-2012, 04:54 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#19
RE: Game Problems

Well you don't have anything in your script called void OnEnter(); which you probably should.
Also, when you put a { you have to end it with a }.

You didn't in CollideDoorExplode...

Trying is the first step to success.
12-08-2012, 05:08 PM
Find
Fishnugget Offline
Member

Posts: 72
Threads: 6
Joined: Aug 2012
Reputation: 1
#20
RE: Game Problems

Where exactly have i to write onenter();?
12-08-2012, 05:21 PM
Find




Users browsing this thread: 2 Guest(s)