Jump to content
Sign in to follow this  
thegunnysgt

titles & detect destroyed building

Recommended Posts

Hello, two things..

I've never wanted or needed to use titles until now, I'm having some dificulity with the timing of them. The wiki never clearly states the appropriate numbers that the timing of the titles can have, is it in seconds, are there set numbers that have to be used such as from 0 to 1. I've tinkered with the timing, but every time I change it to something it changed alot and I can't get the timing I would like. I have a title that I would like to last atleast 3 or 4 seconds, then fade out for about the same amount of seconds.

The second is, how can I detect when a specific building on the map has been destroyed, it is an objective that must be completed.

Thanks!

Share this post


Link to post
Share on other sites

1:

titleText ["This is written in white letters in the middle of your screen, fading in over the course of 3 seconds and fading away in 10 seconds or so","PLAIN", 3];

titleText ["This is written in white letters at the bottom of your screenfading away in 4 seconds because of the titleFadeOut command.","PLAIN DOWN"]; titleFadeOut 4;

titleText ["This will turn your screen black and display this text slowly fading away after 8 seconds.","BLACK IN",8];

titleText ["This will fade your screen to black while displaying this text and never come back, usually.  Adding the titleFadeOut will make it fade back in, kind of, 20 seconds or so.  It's wierd.","BLACK OUT",8];titleFadeOut 4;

2:

Put down a GameLogic named glBuilding on the map.

Click the IDs button on the editor sidebar and zoom in till you see the small number over the building you want destroyed. Use that number in the next step.

Setup a trigger with the condition:

!alive (getPos glBuilding nearestObject 85868)

Where 85868 is the number you found when zooming in on the map.

Edited by kylania

Share this post


Link to post
Share on other sites

You can also just place a trigger over the building and then group the trigger to the building.You then get a new option in the trigger "Static Object" just set the trigger to not present.

Share this post


Link to post
Share on other sites
You can also just place a trigger over the building and then group the trigger to the building.You then get a new option in the trigger "Static Object" just set the trigger to not present.

I always forget that! You do need the trigger to encompass the building though, so make sure the area of the trigger includes the building. Great tip!

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  

×