Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Level Editor Help Cell_Breakable_Wall isn't breaking!
Author Message
MissMarilynn Offline
Member

Posts: 74
Joined: Oct 2011
Reputation: 0
Post: #1
Cell_Breakable_Wall isn't breaking!
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?
01-09-2012 08:07 PM
Find all posts by this user Quote this message in a reply
Inurias Offline
Junior Member

Posts: 20
Joined: Jan 2012
Reputation: 2
Post: #2
RE: Cell_Breakable_Wall isn't breaking!
You probably need to make a script again :3

Hint:
You will most likely need:
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
Find all posts by this user Quote this message in a reply
MissMarilynn Offline
Member

Posts: 74
Joined: Oct 2011
Reputation: 0
Post: #3
RE: Cell_Breakable_Wall isn't breaking!
(01-09-2012 08:27 PM)Inurias Wrote:  You probably need to make a script again :3

Hint:
You will most likely need:
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
Find all posts by this user Quote this message in a reply
XxRoCkBaNdMaNxX Offline
Posting Freak

Posts: 1,119
Joined: Nov 2010
Reputation: 5
Post: #4
RE: Cell_Breakable_Wall isn't breaking!
(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:
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? >_<;
OnStart()

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

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



Sometime like that...

I've come to learn to not fear the living, nor the dead... But the monsters that hide in closets.
01-10-2012 12:48 AM
Find all posts by this user Quote this message in a reply
MissMarilynn Offline
Member

Posts: 74
Joined: Oct 2011
Reputation: 0
Post: #5
RE: Cell_Breakable_Wall isn't breaking!
(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:
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? >_<;
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.
01-10-2012 01:26 AM
Find all posts by this user Quote this message in a reply
flamez3 Offline
Posting Freak

Posts: 1,320
Joined: Apr 2011
Reputation: 57
Post: #6
RE: Cell_Breakable_Wall isn't breaking!
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

(This post was last modified: 01-10-2012 02:21 AM by flamez3.)
01-10-2012 02:19 AM
Find all posts by this user Quote this message in a reply
XxRoCkBaNdMaNxX Offline
Posting Freak

Posts: 1,119
Joined: Nov 2010
Reputation: 5
Post: #7
RE: Cell_Breakable_Wall isn't breaking!
(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:
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? >_<;
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.

I've come to learn to not fear the living, nor the dead... But the monsters that hide in closets.
01-10-2012 02:55 AM
Find all posts by this user Quote this message in a reply
flamez3 Offline
Posting Freak

Posts: 1,320
Joined: Apr 2011
Reputation: 57
Post: #8
RE: Cell_Breakable_Wall isn't breaking!
(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:
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? >_<;
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.

01-10-2012 03:31 AM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)