Can I make models Break or Disappear on touch. -1 reply

Please wait...

Skrie

Teh Totalconverterer !

50 XP

29th December 2006

0 Uploads

114 Posts

0 Threads

#1 10 years ago

For a map I'm working on I made myself some models of wineglasses and plates with fruits in 3dmax.

finewine.jpg

But after I finished I realized... I couldn't make em breakable. Which is kinda stupid. Having glass objects that can't break.

So... I was wondering... is there a way to script arround this ? Maybe making the models disappear and putting a breakable clipping brush in the place of the glasses ?




~*Seto*~

Trapped in the interchet

50 XP

19th October 2007

0 Uploads

334 Posts

0 Threads

#2 10 years ago

Try using a func_breakable or func_usable with the model2 key.




Skrie

Teh Totalconverterer !

50 XP

29th December 2006

0 Uploads

114 Posts

0 Threads

#3 10 years ago
~*Seto*~;4303712Try using a func_breakable or func_usable with the model2 key.

How does that work ? I've not heard of a model2 key. Isn't that one just putting a model after you break/use the func ?




NAB622

EAT ME!

50 XP

8th October 2005

0 Uploads

6,921 Posts

0 Threads

#4 10 years ago

No, that would go in the entity window. It would function just like the "model" key.




Skrie

Teh Totalconverterer !

50 XP

29th December 2006

0 Uploads

114 Posts

0 Threads

#5 10 years ago
ov_nab622;4303961No, that would go in the entity window. It would function just like the "model" key.

I tried putting that model2 key in the entity window of a random func_usable. brush. (and of course refered to the model that I want it to display. )

But I just don't see how that would work tbh. I need the model to be there and then disappear, the way I imagine this model2 function to work... is a model to be loaded on to the scene where the usable brush is used.




Skrie

Teh Totalconverterer !

50 XP

29th December 2006

0 Uploads

114 Posts

0 Threads

#6 10 years ago
ov_nab622;4303961No, that would go in the entity window. It would function just like the "model" key.

alrighty... It worked :D with a func breakable and a model2.

The only thing that bothers me is the origin.

I put origin and an angle key in there... but only the origin key works. the modle is still not rotated 90 degrees like I wanted. I'll keep puzzling a bit, but if anyone has a clue here...

Thx so far ! :bows:




SiLink

(JAWA) Leader

50 XP

13th February 2005

0 Uploads

1,663 Posts

0 Threads

#7 10 years ago

If it disappears then it doesn't sound very realistic which isn't what you were aiming for originally I know however perhaps add a glass breaking sound upon vanishing and maybe play a small glass shattering effect when it disappears to make it look like it's breaking perhaps ^^




Skrie

Teh Totalconverterer !

50 XP

29th December 2006

0 Uploads

114 Posts

0 Threads

#8 10 years ago
SiLink;4304271If it disappears then it doesn't sound very realistic which isn't what you were aiming for originally I know however perhaps add a glass breaking sound upon vanishing and maybe play a small glass shattering effect when it disappears to make it look like it's breaking perhaps ^^

Ohh no worries about that.... the model disappears... but you get shattered glass and the sound of shattering glass in return.

The only thing I can't seem to fix is the angle of the model. (which in case of the round glass doesn't matter... but it does on other models I want to make destructable).

Any thought on the angle ???

Right now... I'm using an origin brush... which works. Except for the angle... no matter how I place the brush or how I add "angle" to the entity... It always faces the same way.




~*Seto*~

Trapped in the interchet

50 XP

19th October 2007

0 Uploads

334 Posts

0 Threads

#9 10 years ago

If I remember right, there was a special key called "modelangles" or something that applied to the model2... BUT, I think that was only for SP... so...

First I'd say try using "angles" instead of "angle," with a supplied rotation vector (eg, if your angle is 90 then angles should be 0 90 0). I know angles will rotate the bmodel itself, but I've never actually tried it on one with a model2, so there's a chance it won't work. In that case, I'm pretty sure that scripting the rotation (make a script with a rotate command, set it as the entity spawnscript) will work since I know it works with func_door ents that have a model2. In both cases, assuming rotation is possible on the entity, the bmodel itself should rotate as well, so if the shape of your model is asymmetrical you may need to adjust. Also, if you have any weird origin on it, the rotation will do strange things... so try to keep the bmodel centered on itself (ie, don't let it have an additional "origin" key, otherwise you have to change that too in addition to rotating to end up in the same spot).