Frictional Games Forum (read-only)

Full Version: Cell_Breakable_Wall isn't breaking!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?
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
(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? >_<;
(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...

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