Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Spreading Broken Plates
Dominic0904 Offline
Member

Posts: 63
Threads: 14
Joined: Apr 2011
Reputation: 0
#1
Spreading Broken Plates

Hey, I was wondering how would I get the broken plate entity (named plate_broken) to spread out in a room that I made. The room is meant to have a bunch of smashed plates and non smashed plates in it. The only way I've figure out to spread it a tiny bit is to place the plates above an object, so when they drop they break apart.

This doesn't really solve the issue cause I'd want the broken plate bits all over the room and not just were they've fallen onto the objects.

Is there something I can script where they would explode or something and scatter around the room?

Thanks.
03-25-2013, 07:03 PM
Find
Akos115 Offline
Member

Posts: 101
Threads: 14
Joined: Aug 2012
Reputation: 0
#2
RE: Spreading Broken Plates

Try using AddPropForce, AddPropImpulse, AddBodyForce or AddBodyImpulse.

03-25-2013, 07:08 PM
Find
NaxEla Offline
Senior Member

Posts: 415
Threads: 5
Joined: Dec 2012
Reputation: 28
#3
RE: Spreading Broken Plates

Using SetPropHealth, you can make the plates explode.
SetPropHealth("NameOfPlate", 0);

In Ruins [WIP]
03-25-2013, 07:10 PM
Find
Dominic0904 Offline
Member

Posts: 63
Threads: 14
Joined: Apr 2011
Reputation: 0
#4
RE: Spreading Broken Plates

(03-25-2013, 07:10 PM)NaxEla Wrote: Using SetPropHealth, you can make the plates explode.
SetPropHealth("NameOfPlate", 0);

That works great! Is there an easier way to do it for multiple different plates? So I don't have to keep copy and pasting that function and changing the name?

Because I may need to get 20-30+ plates to be smashed in that room.
(This post was last modified: 03-25-2013, 07:57 PM by Dominic0904.)
03-25-2013, 07:49 PM
Find
NaxEla Offline
Senior Member

Posts: 415
Threads: 5
Joined: Dec 2012
Reputation: 28
#5
RE: Spreading Broken Plates

SetPropHealth("plate_*", 0);

By putting the asterisk there, it will break all the plates as long as the names are the same except the number at the end.

In Ruins [WIP]
03-25-2013, 07:57 PM
Find
Dominic0904 Offline
Member

Posts: 63
Threads: 14
Joined: Apr 2011
Reputation: 0
#6
RE: Spreading Broken Plates

(03-25-2013, 07:57 PM)NaxEla Wrote:
SetPropHealth("plate_*", 0);

By putting the asterisk there, it will break all the plates as long as the names are the same except the number at the end.

You are a god send. Thank you so much!

Just need to figure out how to disable the sound of them breaking, because the player starts within earshot. So the player would always here the plates being smashed when the map is loaded. :S
03-25-2013, 08:02 PM
Find




Users browsing this thread: 1 Guest(s)