Jump to content
Sign in to follow this  
Nicholas

Pre-Destroy Buildings?

Recommended Posts

I am building a WWII mission using the Invasion 1944 mod. Is there anyway I can set buildings to be pre-destroyed? So, when the mission starts, it looks like there was already a battle there?

Thanks.

Also, is there a way I can set some buildings to "smoke" so it looks as if the battle was only recently?

Share this post


Link to post
Share on other sites

Thank you very much, Rioken!

Now how do I use it with a script?

Edited by Nicholas

Share this post


Link to post
Share on other sites

I got it to work, now how do I add it to a script? I want the buildings to be destroyed before the game loads, but as it is with the trigger, they all get destroyed in front of you.

________________________________________________

Now I got it to work via a script, but it still destroyed the buildings just as I load in. Is there a way to make them destroyed before the player can load in? Thanks.

Edited by Nicholas

Share this post


Link to post
Share on other sites

Run it from init.sqf. You'll want to preplace mrkIntro somewhere far away from the action.

// Black screen, fade intro.
titleCut ["", "BLACK FADED", 999];
[] Spawn {
waitUntil{!(isNil "BIS_fnc_init")}; // Functions are GO!

// Start to destroy the city
[player, 500] call bis_fnc_destroyCity;

// Grab the player's starting point so he looks to be in the city during briefing.
_startPos = getPosATL player;

// Then dump him to a far away spot marked with a marker
player setPosATL getMarkerPos "mrkIntro";

// Some inspirational text.
titleText ["Shit just got real...","PLAIN"]; 
titleFadeOut 6;

// let the explosions die down
sleep 5;

// Put the player back
player setPosATL _startPos;

"dynamicBlur" ppEffectEnable true;   
"dynamicBlur" ppEffectAdjust [6];   
"dynamicBlur" ppEffectCommit 0;     
"dynamicBlur" ppEffectAdjust [0.0];  
"dynamicBlur" ppEffectCommit 5;  

titleCut ["", "BLACK IN", 5];
};

Share this post


Link to post
Share on other sites

no there is no way, you can use black screen to mask it...

in script do this:

cutText ["","BLACK"];
_ret = [position,areaSize,seed,blacklist] call BIS_fnc_destroyCity;
sleep 2;
cutText ["","BLACK IN"];

edit: note to self, refresh old pages...

Share this post


Link to post
Share on other sites

Thansk Kylania, that works great! Although is there a way to mute sound as well for the first 3 seconds or so? I can hear the sound for just a second at the beginning.

Share this post


Link to post
Share on other sites

You could move the player first then do the destroy city call, but you'd have to change player to _startPos in the code.

Share this post


Link to post
Share on other sites
Thansk Kylania, that works great! Although is there a way to mute sound as well for the first 3 seconds or so? I can hear the sound for just a second at the beginning.

At the VERY end of init.sqf put this:

0 fadesound 0;
~5.0
0 fadesound 1;

Share this post


Link to post
Share on other sites
At the VERY end of init.sqf put this:

0 fadesound 0;
~5.0
0 fadesound 1;

Actually don't do this because that syntax is wrong. You just gave him SQS code when he's using SQF.

0 fadesound 0;
Sleep 5;
0 fadesound 1;

is how it should look in SQF

Share this post


Link to post
Share on other sites

Cool it works! Thanks.

I've never gone so far in creating such a mission. It's a very simple mission infact, just a bunch of AI in a battle with a simple end script for whichever side is not present. Maybe I'll try to make it a little more complicated, seeing how helpful you guys are here.

Thanks again everyone.

Edited by Nicholas

Share this post


Link to post
Share on other sites
Actually don't do this because that syntax is wrong. You just gave him SQS code when he's using SQF.

0 fadesound 0;
Sleep 5;
0 fadesound 1;

is how it should look in SQF

I accidently wrote "init.sqf", although I mean "sqS". I am using the code I gave above in my own init.sqs'es.

Edited by RogueTrooper

Share this post


Link to post
Share on other sites

I thought I had a method for starting with a pre-destroyed town.

It did actually work on a small scale but in the real World it falls over.

All I did was to destroy the area and then use nearestobjects to find the ruins and use copy to clipboard to get the data.

When you next run the game just swap out the buildings with the ruins.

Where it falls over is when you encounter buildings that aren't destructible, also fences and walls are another problem.

Oh well.

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  

×