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
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


Messages In This Thread
Wall script - by Saren - 03-06-2012, 11:53 AM
RE: Wall script - by flamez3 - 03-06-2012, 12:02 PM
RE: Wall script - by Saren - 03-06-2012, 12:08 PM
RE: Wall script - by flamez3 - 03-06-2012, 12:22 PM
RE: Wall script - by Saren - 03-06-2012, 12:26 PM
RE: Wall script - by flamez3 - 03-06-2012, 01:04 PM
RE: Wall script - by Saren - 03-06-2012, 01:55 PM
RE: Wall script - by flamez3 - 03-06-2012, 02:38 PM
RE: Wall script - by Saren - 03-06-2012, 02:42 PM
RE: Wall script - by flamez3 - 03-06-2012, 03:01 PM
RE: Wall script - by Saren - 03-06-2012, 03:14 PM
RE: Wall script - by flamez3 - 03-06-2012, 03:30 PM
RE: Wall script - by Saren - 03-06-2012, 03:38 PM
RE: Wall script - by Saren - 03-06-2012, 11:17 PM
RE: Wall script - by Your Computer - 03-07-2012, 12:05 AM
RE: Wall script - by Saren - 03-07-2012, 12:12 AM
RE: Wall script - by Your Computer - 03-07-2012, 12:27 AM
RE: Wall script - by flamez3 - 03-07-2012, 02:34 AM
RE: Wall script - by Saren - 03-07-2012, 07:52 AM
RE: Wall script - by flamez3 - 03-07-2012, 08:29 AM
RE: Wall script - by Saren - 03-07-2012, 09:02 AM
RE: Wall script - by flamez3 - 03-07-2012, 09:19 AM
RE: Wall script - by Saren - 03-07-2012, 09:21 AM
RE: Wall script - by flamez3 - 03-07-2012, 11:17 AM
RE: Wall script - by Saren - 03-07-2012, 11:19 AM
RE: Wall script - by Your Computer - 03-07-2012, 11:23 AM
RE: Wall script - by flamez3 - 03-07-2012, 11:32 AM
RE: Wall script - by Saren - 03-07-2012, 11:57 AM
RE: Wall script - by flamez3 - 03-07-2012, 12:34 PM
RE: Wall script - by Saren - 03-07-2012, 02:47 PM
RE: Wall script - by flamez3 - 03-07-2012, 03:28 PM
RE: Wall script - by Saren - 03-07-2012, 08:07 PM
RE: Wall script - by flamez3 - 03-07-2012, 11:12 PM
RE: Wall script - by Ardoetia - 03-08-2012, 04:27 AM
RE: Wall script - by Saren - 03-08-2012, 07:54 AM
RE: Wall script - by flamez3 - 03-08-2012, 08:12 AM
RE: Wall script - by Saren - 03-08-2012, 08:40 AM
RE: Wall script - by flamez3 - 03-08-2012, 11:18 AM
RE: Wall script - by Saren - 03-08-2012, 11:29 AM
RE: Wall script - by flamez3 - 03-08-2012, 11:32 AM
RE: Wall script - by Saren - 03-08-2012, 11:38 AM
RE: Wall script - by flamez3 - 03-08-2012, 12:20 PM
RE: Wall script - by Saren - 03-08-2012, 12:36 PM
RE: Wall script - by flamez3 - 03-08-2012, 12:38 PM
RE: Wall script - by Saren - 03-08-2012, 04:14 PM



Users browsing this thread: 3 Guest(s)