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


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Wall script
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#31
RE: Wall script

I don't like spoonfeeding everyone all the time lol

(This post was last modified: 03-07-2012, 03:28 PM by flamez3.)
03-07-2012, 03:28 PM
Find Reply
Saren Offline
Member

Posts: 196
Threads: 20
Joined: Jan 2012
Reputation: 1
#32
RE: Wall script

(03-07-2012, 03:28 PM)flamez3 Wrote: I don't like spoonfeeding everyone all the time lol
I see that.... xD
But you could have said.... there's something missing in the callback.... THAT would have made me like..... hmm... let's see here.. what's missing.... AAAHHH xD

EDIT: oh goody.... still not working
//Cell wall
AddUseItemCallback("", "Hammer & Chipper", "cell_breakable_wall_1", "BreakWall", false);
}
void BreakWall(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("cell_breakable_wall_1", false, true);
PlaySoundAtEntity("", "unlock_door", "cell_breakable_wall_1", 0, false);
SetEntityActive("cell_breakable_wall_1", false);
}

void OnLeave()
{

}
HOW CAN THAT BE WRONG.... SERIOUSLY!?

(This post was last modified: 03-07-2012, 08:29 PM by Saren.)
03-07-2012, 08:07 PM
Find Reply
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#33
RE: Wall script

I did say that you missed the internal name alot of times actually. Anyway. Can you post the entire script instead of posting the one callback and function.

03-07-2012, 11:12 PM
Find Reply
Ardoetia Offline
Junior Member

Posts: 46
Threads: 4
Joined: Feb 2012
Reputation: 0
#34
RE: Wall script

I would use:

AddUseItemCallback("", "stone_hammer_chipper", "cell_breakable_wall_1", "BreakWall", false);
}

void BreakWall(string &in asItem, string &in asEntity)
{
//SetSwingDoorLocked("cell_breakable_wall_1", false, true);
//PlaySoundAtEntity("", "unlock_door", "cell_breakable_wall_1", 0, false)
SetEntityActive("cell_breakable_wall_1", false);
SetEntityActive("cell_breakable_wall_broken_1", true);
}



Where the "cell_breakable_wall_broken_1" is a placed wall you have placed yourself inside the first one, and making it inactive.

Aswell as "stone_hammer_chipper" is the trivial name of the hammer & chipper. I think it might bug if you rename it to that, I just use the trivial or no spaces.

//PlaySoundAtEntity("", "unlock_door", "cell_breakable_wall_1", 0, false)
I dont feel like that sound would fit the settings though Smile
(This post was last modified: 03-08-2012, 04:28 AM by Ardoetia.)
03-08-2012, 04:27 AM
Find Reply
Saren Offline
Member

Posts: 196
Threads: 20
Joined: Jan 2012
Reputation: 1
#35
RE: Wall script

(03-08-2012, 04:27 AM)Ardoetia Wrote: I would use:

AddUseItemCallback("", "stone_hammer_chipper", "cell_breakable_wall_1", "BreakWall", false);
}

void BreakWall(string &in asItem, string &in asEntity)
{
//SetSwingDoorLocked("cell_breakable_wall_1", false, true);
//PlaySoundAtEntity("", "unlock_door", "cell_breakable_wall_1", 0, false)
SetEntityActive("cell_breakable_wall_1", false);
SetEntityActive("cell_breakable_wall_broken_1", true);
}



Where the "cell_breakable_wall_broken_1" is a placed wall you have placed yourself inside the first one, and making it inactive.

Aswell as "stone_hammer_chipper" is the trivial name of the hammer & chipper. I think it might bug if you rename it to that, I just use the trivial or no spaces.

//PlaySoundAtEntity("", "unlock_door", "cell_breakable_wall_1", 0, false)
I dont feel like that sound would fit the settings though Smile
I agree, I got the Hammer & Chipper name from a friend of mine, he thought it was called that and I was like.. hm.... really? If you say so.. lol



(03-07-2012, 11:12 PM)flamez3 Wrote: I did say that you missed the internal name alot of times actually. Anyway. Can you post the entire script instead of posting the one callback and function.
Of course I could but, that's the only thing that could be something wrong with, everything else works.... but here

// Run when entering map
void OnStart()
{
AddUseItemCallback("", "Prisonkey", "prisondoor", "UsedKeyOnDoor", true);
AddEntityCollideCallback("Player", "PlayerCollide", "MonsterFunction", true, 1);
AddUseItemCallback("Hammer & Chipper", "cell_breakable_wall_1", "BreakWall", true);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("prisondoor", false, true);
PlaySoundAtEntity("", "unlock_door", "prisondoor", 0, false);
RemoveItem("Prisonkey");
}

//Prison brute
void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_brute", true);
AddEnemyPatrolNode("servant_brute", "PathNodeArea_1", 2, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_6", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_7", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_8", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_9", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_10", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_11", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_12", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_13", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_14", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_15", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_16", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_17", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_18", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_19", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_20", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_21", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_22", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_23", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_24", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_25", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_26", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_27", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_28", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_29", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_30", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_31", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_32", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_33", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_34", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_35", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_36", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_37", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_38", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_39", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_40", 0, "");
}

void Despawnservant_brute(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("servant_brute", false);
}

//Cell wall
AddUseItemCallback("", "Hammer & Chipper", "cell_breakable_wall_1", "BreakWall", false);
}
void BreakWall(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("cell_breakable_wall_1", false, true);
PlaySoundAtEntity("", "unlock_door", "cell_breakable_wall_1", 0, false);
SetEntityActive("cell_breakable_wall_1", false);
}

void OnLeave()
{

}


(This post was last modified: 03-08-2012, 07:55 AM by Saren.)
03-08-2012, 07:54 AM
Find Reply
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#36
RE: Wall script

You still haven't put the "" behind Hammer & Chipper ion the AddUseItemCallback.

03-08-2012, 08:12 AM
Find Reply
Saren Offline
Member

Posts: 196
Threads: 20
Joined: Jan 2012
Reputation: 1
#37
RE: Wall script

(03-08-2012, 08:12 AM)flamez3 Wrote: You still haven't put the "" behind Hammer & Chipper ion the AddUseItemCallback.
Uhm... yes I have
AddUseItemCallback("", "Hammer & Chipper", "cell_breakable_wall_1", "BreakWall", false);
They are right there?


03-08-2012, 08:40 AM
Find Reply
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#38
RE: Wall script

Sorry, wasn't thinking. ALL Callbacks go into the void OnStart().

(This post was last modified: 03-08-2012, 11:19 AM by flamez3.)
03-08-2012, 11:18 AM
Find Reply
Saren Offline
Member

Posts: 196
Threads: 20
Joined: Jan 2012
Reputation: 1
#39
RE: Wall script

(03-08-2012, 11:18 AM)flamez3 Wrote: Sorry, wasn't thinking. ALL Callbacks go into the void OnStart().
Wait, can't you only type 1 of those? Af the second line of the .hps?



03-08-2012, 11:29 AM
Find Reply
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#40
RE: Wall script

No. You can have as many as you need. Only that the functions have different names.

03-08-2012, 11:32 AM
Find Reply




Users browsing this thread: 1 Guest(s)