Making something destructible

Post » Fri Nov 18, 2011 9:39 am

I'd like to make the enclave posters destructible. I would like the player to be able to shoot them with any non-small arms weapon and have them burn up (laser effect or fire effect). Then the player gets a little karma for it.

Possible?

Do I just need to set them as destructible objects in the GECK? What script can I attach to give karma? I'm thinking I need some sort of OnDestroyed type action. Is there any way to get the fire affect everytime? Finally, how to restrict what type of damage would cause the fire?

Thanks.
User avatar
Mariaa EM.
 
Posts: 3347
Joined: Fri Aug 10, 2007 3:28 am

Post » Fri Nov 18, 2011 10:37 am

The first problem is that destruction stages are triggered as the 'health' of the object decreases, and as far as I can tell the health is damaged by any weapon; in other words, you can't restrict it to damage by particular weapons as you want. You can check for an object being hit by particular weapons in a script, using the OnHitWith block. If you set up a form list that contains the list of weapons you want, you can use that in the block command ( e.g. BEGIN OnHitWith FlameWeapons). Giving karma to the player is as simple as including the command 'player.rewardkarma x' (where x is the karma value) in your script.

To do all this, of course, you would have to change the posters from simple statics to something that can take a script and/or destruction data, such as an activator, and then go through the game replacing all the existing posters with yours. In addition, to use the OnHitWith block the object has to have a collision surface, which the current posters do not. That might also be true for destruction stages to work, but I don't know for certain.
User avatar
jason worrell
 
Posts: 3345
Joined: Sat May 19, 2007 12:26 am


Return to Fallout 3