- Joined
- Nov 24, 2012
- Messages
- 218
Hello Hive, I need major help in making a vJass function.
I am very new to vJass. This does not work at all... can anyone enlighten me?
Okay I know TriggerSleepAction and BJ are bad, but if I were to make it periodic would I use a timer or something?
Let's say I wanted the fade to be extra smooth instead of +20% transparency at a time, how would I do it without 100 TriggerSleepActions (and without Timer systems)?
What I want is to write this line to make a certain unit fade away, and ultimately be removed:
The Fade thing is sort of like a system, so would I put it in a library?
What are library and how/when to use specifically?
I am very new to vJass. This does not work at all... can anyone enlighten me?
Okay I know TriggerSleepAction and BJ are bad, but if I were to make it periodic would I use a timer or something?
Let's say I wanted the fade to be extra smooth instead of +20% transparency at a time, how would I do it without 100 TriggerSleepActions (and without Timer systems)?
JASS:
scope
function Fade takes unit returns nothing
call SetUnitVertexColorBJ( unit, 100, 100, 100, 20.00 )
call TriggerSleepAction (0.25)
call SetUnitVertexColorBJ( unit, 100, 100, 100, 40.00 )
call TriggerSleepAction (0.25)
call SetUnitVertexColorBJ( unit, 100, 100, 100, 60.00 )
call TriggerSleepAction (0.25)
call SetUnitVertexColorBJ( unit, 100, 100, 100, 80.00 )
call TriggerSleepAction (0.25)
call RemoveUnit(unit)
return false
endfunction
endscope
What I want is to write this line to make a certain unit fade away, and ultimately be removed:
JASS:
call Fade(unit)
The Fade thing is sort of like a system, so would I put it in a library?
What are library and how/when to use specifically?