Making units appear ( fade in )

warpo

New Member
Reaction score
5
I have a cinemat level where I want some night elves to be hidden.. and then at one point come into view while moving, ya know have a nice even fade in. I guess its almost like a shadowmeld but not instant appearing when you move. Do I need to make some special ability or something and then create a special archer with that ability ???? :nuts:
 

Dregonx

TH.net Regular
Reaction score
21
Could give them permanent invisibility and change the vaules for fading to your likings.

Then make them allies with the player you want to see fade in after A seconds that they've started moving, but making sure it's half of what the total fade time is. (Which will be B seconds)

(So like A seconds being lower then B seconds, but B seconds being double whatever A seconds is, if that makes sense.)

Then after they fade in completely which is the entire B seconds, you'd make them enemies with that player again.
 

Marsmallos

Member
Reaction score
17
Writing from memory since I dont got the editor here.

First make an initilaization trigger that makes them invisible:

Code:
Events
Map initialization (or elapsed time or whatever)
Conditions
Actions
Set [COLOR="Blue"]MyArcherGroupVariable[/COLOR] = Units in PickArchersRegion <gen> [COLOR="Red"](say you put all your archers inside this region)[/COLOR]
Pick every unit in MyArcherGroupVariable and do actions
 loop actions:
   Animation - set the vertex colouring of (picked unit) to (100%, 100%, 100%) with 100% transparency [COLOR="Red"](100% = it is completely invisible)[/COLOR]

Then

Code:
Events
Whatever you like
Conditions
Whatever you like
Actions
set [COLOR="Blue"]TransparencyRealVariable[/COLOR] = 100     [COLOR="Red"](a Real variable)[/COLOR]
For each Integer A from 1 to 5, do actions
 loop
    Set [COLOR="Blue"]TransparencyRealVariable[/COLOR] = ([COLOR="Blue"]TransparencyRealVariable[/COLOR] - 20)
    Pick every unit in [COLOR="Blue"]MyArcherGroupVariable[/COLOR] and do actions
       loop
         Animation - set the vertex colouring of (picked unit) to (100%, 100%, 100%) with T[COLOR="Blue"]ransparencyRealVariable[/COLOR]% transparency
    Wait 1 second

Clean up leaks and fix anything that I might have done wrong (since I am writing from memory) but *hopefully* something along these lines should work :)

Hope I helped!
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top