Jump to content
Sign in to follow this  
roguetrooper

Destroyed buildings right from the beginning?

Recommended Posts

Is it possible to have destroyed buildings right from the beginning, so that they are already destroyed before the player is actually ingame?

When you destroy map-intern buildings with nearestObject(s) and setdamage, the building collapse when the map has already started and the player/s is/are already ingame and the player can/has to see how they actually are collapsing.

In the first PMC map there are destroyed buildings, but I don't know whether they are destroyed while the player recovers/awakes from the shock.

Share this post


Link to post
Share on other sites

i think i remember something about a module with a init that pre destroys a area of buildings used in PMC campaign, but cant remember exactly what, did a quick search and did not find it.

maybe it was a dream :)

else you can just use cutText and a fade out screen for player, then destroy them, then fade back in for player, hiding the destruction.

Share this post


Link to post
Share on other sites

Yeah the destroyCity function damages the buildings in-game. This is obviously masked in PMC by the intro title sequences, so you would need to do something like Demonized said. Personally I always use a fade from black + infotext or something in most missions anyway.

And as per my post in that thread Sel linked, if anyone knows how to get the building blacklist working then I'd like to hear about it.

Share this post


Link to post
Share on other sites

Hm, been playing around with BIS_fnc_destroyCity and indeed it only damages/destroyes buildings after the map has already started.

Should be an issue for a future patch. Map-internal buildings, plants, rocks and everything else should be deletable by a command/function so that the map starts right off with the object already being destroyed (ruin) or removed at all.

---------- Post added at 05:54 PM ---------- Previous post was at 05:29 PM ----------

Hey, I've found a workaround how to remove buildings from the map without the destruction animation

Little testmap in Zargabad, wpc1 is a logic or invisible helipad or whatever:

_center = wpc1;
_radius = 5000;

_keepobjs  = [player];
_keeptypes = [];

{ if !(_x in _keepobjs) then {[b][color="Red"]_x hideobject true[/color][/b]} } forEach (position _center nearObjects _radius);

exit;

As you know, hidden objects are not only invisibly but actually not 'present', so you don't have invisible walls and such.

Couriosly trees, market umbrellas, walls and the mosque are not affected. The hiding/deletion condition could be (enhanced to) _x iskindof "Building" to exclude everything that is not a building. Or add if (random(100)<50) to remove only half of the town etc.....

In a MP map of course the server would have to define the (random) list of objects, then broadcast this array by publicVariable and have all clients use that array so that everyone has the same non-existing buildings ^^

Edit:

Seemingly there are glitches with some buildings. E.g. the flight control tower at the airfield. It is still visible but you can walk through it.

Edited by RogueTrooper

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×