Frictional Games Forum (read-only)
Wall script - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Wall script (/thread-13808.html)

Pages: 1 2 3 4 5


RE: Wall script - flamez3 - 03-07-2012

I don't like spoonfeeding everyone all the time lol


RE: Wall script - Saren - 03-07-2012

(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!?



RE: Wall script - flamez3 - 03-07-2012

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.


RE: Wall script - Ardoetia - 03-08-2012

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


RE: Wall script - Saren - 03-08-2012

(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()
{

}




RE: Wall script - flamez3 - 03-08-2012

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


RE: Wall script - Saren - 03-08-2012

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




RE: Wall script - flamez3 - 03-08-2012

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


RE: Wall script - Saren - 03-08-2012

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





RE: Wall script - flamez3 - 03-08-2012

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