Frictional Games Forum (read-only)
[LVL ED] Cell_Breakable_Wall isn't breaking! - 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: [LVL ED] Cell_Breakable_Wall isn't breaking! (/thread-12497.html)



Cell_Breakable_Wall isn't breaking! - MissMarilynn - 01-09-2012

The wall isn't breaking...why is this happening?

I want to be able to throw a chair or any object at it to break it. Is there a different wall I should choose that's similar to it?


RE: Cell_Breakable_Wall isn't breaking! - Inurias - 01-09-2012

You probably need to make a script again :3

Hint:
You will most likely need:
Code:
void SetPropHealth(string& asName, float afHealth);

There are probably more ways to detect the chair touching the wall, but you could just use an Area again.

- Inurias



RE: Cell_Breakable_Wall isn't breaking! - MissMarilynn - 01-09-2012

(01-09-2012, 08:27 PM)Inurias Wrote: You probably need to make a script again :3

Hint:
You will most likely need:
Code:
void SetPropHealth(string& asName, float afHealth);

There are probably more ways to detect the chair touching the wall, but you could just use an Area again.

- Inurias
*cries* I hate scripting. Smile

so how would I write that out? >_<;


RE: Cell_Breakable_Wall isn't breaking! - RawkBandMan - 01-10-2012

(01-09-2012, 10:54 PM)MissMarilynn Wrote:
(01-09-2012, 08:27 PM)Inurias Wrote: You probably need to make a script again :3

Hint:
You will most likely need:
Code:
void SetPropHealth(string& asName, float afHealth);

There are probably more ways to detect the chair touching the wall, but you could just use an Area again.

- Inurias
*cries* I hate scripting. Smile

so how would I write that out? >_<;
Code:
OnStart()

AddEntityCollideCallback("", "chair_1", "script_area_1", "breakwall", true);

void breakwall(string &in asEntity)
{
SetPropHealth("breakable_wall_1", 0.0f);
}



Sometime like that...




RE: Cell_Breakable_Wall isn't breaking! - MissMarilynn - 01-10-2012

(01-10-2012, 12:48 AM)XxRoCkBaNdMaNxX Wrote:
(01-09-2012, 10:54 PM)MissMarilynn Wrote:
(01-09-2012, 08:27 PM)Inurias Wrote: You probably need to make a script again :3

Hint:
You will most likely need:
Code:
void SetPropHealth(string& asName, float afHealth);

There are probably more ways to detect the chair touching the wall, but you could just use an Area again.

- Inurias
*cries* I hate scripting. Smile

so how would I write that out? >_<;
Code:
OnStart()

AddEntityCollideCallback("", "chair_1", "script_area_1", "breakwall", true);

void breakwall(string &in asEntity)
{
SetPropHealth("breakable_wall_1", 0.0f);
}



Sometime like that...


Why would you need a script area to break something? Should ScriptArea1 be the item? and I want any item to break the wall not just a chair.


RE: Cell_Breakable_Wall isn't breaking! - flamez3 - 01-10-2012

If you want any item to break the wall this might take a while. You would have to make a addentitycollidecallback for every entity that can be picked up in the room and link them all to "breakwall". (note I haven't tested this out yet)

AddEntityCollideCallback would need to use a scriptarea, unless you were to make a callback on the wall itself...e.g:

AddEntityCollideCallback("", "chair_1", "breakable_wall_1 ", "breakwall", true);


It's up to you. Either way you would need to use AddEntityCollideCallback


RE: Cell_Breakable_Wall isn't breaking! - RawkBandMan - 01-10-2012

(01-10-2012, 01:26 AM)MissMarilynn Wrote:
(01-10-2012, 12:48 AM)XxRoCkBaNdMaNxX Wrote:
(01-09-2012, 10:54 PM)MissMarilynn Wrote:
(01-09-2012, 08:27 PM)Inurias Wrote: You probably need to make a script again :3

Hint:
You will most likely need:
Code:
void SetPropHealth(string& asName, float afHealth);

There are probably more ways to detect the chair touching the wall, but you could just use an Area again.

- Inurias
*cries* I hate scripting. Smile

so how would I write that out? >_<;
Code:
OnStart()

AddEntityCollideCallback("", "chair_1", "script_area_1", "breakwall", true);

void breakwall(string &in asEntity)
{
SetPropHealth("breakable_wall_1", 0.0f);
}



Sometime like that...


Why would you need a script area to break something? Should ScriptArea1 be the item? and I want any item to break the wall not just a chair.
For any item to break it, you would need to make like different scripts for each of the items in the map. Unless you feel like making 10 different scripts all on the same thing it's honestly not really worth it.



RE: Cell_Breakable_Wall isn't breaking! - flamez3 - 01-10-2012

(01-10-2012, 02:55 AM)XxRoCkBaNdMaNxX Wrote:
(01-10-2012, 01:26 AM)MissMarilynn Wrote:
(01-10-2012, 12:48 AM)XxRoCkBaNdMaNxX Wrote:
(01-09-2012, 10:54 PM)MissMarilynn Wrote:
(01-09-2012, 08:27 PM)Inurias Wrote: You probably need to make a script again :3

Hint:
You will most likely need:
Code:
void SetPropHealth(string& asName, float afHealth);

There are probably more ways to detect the chair touching the wall, but you could just use an Area again.

- Inurias
*cries* I hate scripting. Smile

so how would I write that out? >_<;
Code:
OnStart()

AddEntityCollideCallback("", "chair_1", "script_area_1", "breakwall", true);

void breakwall(string &in asEntity)
{
SetPropHealth("breakable_wall_1", 0.0f);
}



Sometime like that...


Why would you need a script area to break something? Should ScriptArea1 be the item? and I want any item to break the wall not just a chair.
For any item to break it, you would need to make like different scripts for each of the items in the map. Unless you feel like making 10 different scripts all on the same thing it's honestly not really worth it.

Not really, you can have them all adding to the same function, but you will have to create separate callbacks if that what you were meaning.