Make unbreakable sprites breakable

Started by David B., 25 October 2012, 19:59:25

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

David B.

Hi,
I'm trying to make a fun trick while detailing a map : here is the picture, you're going to laugh.

It's maybe something light and unrelevant, but the issue itself could be encountered in any other circumstances. I know, here it's just a glass !

Ok, I hope you're still fascinated by the question : when I shoot the glass, the liquid cocktail and the lime remains. It's a combat zone, so it will necessarily happens that a lost bullet or explosion will break all this stuff, excepted the tiles used nr #63 & #64.

You'll necessarily think why that guy comes with such an issue, but I'm interested by the technical aspect of the problem.
What if I want to make some tiles "breakable", so they blow up like the glasses ? I know the opposite - making breakable sprite "unbreakable" - is difficult and need codes or invisible blocking extra sprites which won't protect from blast radius.

Hope I won't attract lightning on me with this topic  ::)



[attachment deleted by admin]
David B.

Forge

#1
as far a blowing them up with explosives, giving the sprites hi-tags will work for that. shooting them is another matter; even if there is a tag or some such to make them "shootable", you'll still end up with "floating" sprites until they all are individually shot

edit: the best option may be to use an art file and make your own sprites that don't have several individual "pieces"
Take it down to the beach with a hammer and pound sand up your ass

High Treason

Sort of the reverse of what you're trying to do, but;

Make an unaccessible sector, maybe surrounding the room with 1-way walls. Make a note of the sector number. In 2D mode, bring the console down and enter script_expertmode, F8 on the breakable sprite and then change the sectnum to the inaccesible sector, this should prevent it being affected by hitscan weapons.

Then, link them all together with a hitag, because explosions will still break them and this ensures they all break at the same time.
[glow=black,2,300]sprite[].sectnum -1[/glow]

David B.

I don't know what you exactly mean with 1-way walls.
I've done an unaccessible sector which is located below the playable sector, and changed the sprites sectnum & hitag.
Some of the sprites with new sectnum just disappears in the game, others not. But I probably didn't do that properly.
David B.

High Treason

Yeah, that's why I said about maybe surrounding the room, the sector needs to be somewhere that it will be drawn each time the sprites should be visible. It can be rather tedious to get these things working. Also, keep in mind, that the sectnum might change during editing, so if you do use this method for anything, make sure you do one last check of the sectnum before the final save.

The reason I suggested 1-way walls was that the engine seems to draw the secttor on the other side of them anyway, even though you can't see it.
[glow=black,2,300]sprite[].sectnum -1[/glow]