Jump to content
Sign in to follow this  
1para{god-father}

how to script end game

Recommended Posts

Another question please I want to delay the end of the game so i have used Sleep 60 before just before endmission but it does not wait it just ends the mission ?

i.e

what i am trying to do is use hint to say why it is end of the mission

Thanks

Share this post


Link to post
Share on other sites

The way I do it, which most likely isn't the easiest or right way, but it works...

1. Have a trigger (activation:NONE, type:END #1, name:end, condition:end)

2. Have another trigger (activation:NONE, condition:*whatever is required to end mission*, on act:nul=[] execVM "end.sqf")

I use my end.sqf for sleeps, hints, etc...

playMusic "outro"; 
sleep 3;
titleCut ["Mission Success! Good job!", "Black Out",8]; titleFadeOut 20;
sleep 20;
titleCut ["", "BLACK FADED",15]; titleFadeOut 15;
sleep 5;

end = true; 

I'm not 100% sure, but I don't think I've ever had success putting sleep in a trigger.

I hope this helps in the meantime, but maybe someone will come by with better knowledge than me and give some better advice.

Share this post


Link to post
Share on other sites

You can't put it directly to trigger, but if you want to avoid using an external file you can do:

nul = [] spawn {
 hint "hi";
 sleep 60;
 hint "hi again";
};

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  

×