PDA

View Full Version : Make Certain Objects Undestroyable?



Commander1985
Nov 2 2009, 17:47
I there, i want to make those Bridges in my map not destroyable.
Any hint on how to do that? I think it could be handled with a script or config.cpp but im not sure, and i have no idea of how to do that if it works that way. Any Ideas or Links/Tuts ?

tcp
Nov 2 2009, 18:15
Use the Show ID button in the editor, zoom in on the bridge to find its ID.
Create a small object and place it near the bridge (doesn't have to be that close).
If ID is 12345, Init Line of object:
brgLondon = (getPos this) nearestObject 12345; brgLondon allowDamage false;

Sometimes allowDamage isn't enough with multiple direct hits, so you could add:
brgLondon addEventHandler ["Hit",{brgLondon setDamage 0;}];

Commander1985
Nov 3 2009, 19:46
Okay thanks, ill give it a try :)