• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Bahamuts Gigas Flare

Status
Not open for further replies.
Level 5
Joined
Apr 6, 2006
Messages
98
A charge up spell that channels for a certain amount of time then releases energy....pretty much the same as D0Tas keeper of the light's illuminate spell....i can get the main spells but i cant make the triggering for the chargin and the increasing of damage per sec....any1 can help??
 
Level 11
Joined
Jul 12, 2005
Messages
764
trigger#1:
Event - spell effect
Caondition - spell = yourSpell
Action:
Set ChargeCounter = 0
Set ChargeEnd = false
Custom Script: loop
Custom Script: exitwhen udg_ChargeCounter > 5 or udg_ChargeEnd == true
Custom Script: call TriggerSleepAction(1)
Custom Script: set udg_ChargeCounter = udg_ChargeCounter + 1
Custom Script: endloop
Create unit at pos of triggering unit
Set last created unit's dummy ability level to ChargeCounter
Order...
.
.

trigger#2
Event - unit stops channeling
Condition - spell = yourSpell
Action:
Set ChargeEnd = true

So you need 2 vars, ChargeCounter is an integer, ChargeEnd is a boolean variable. The custom script part is in jass. In jass, you have to put an 'udg_' part before the variable's name. TriggerSleepAction is the same as Wait in GUI.
Little explanation of custom script:
JASS:
loop  //--> starts the loop actions
exitwhen udg_ChargeCounter > 5 or udg_ChargeEnd == true //--> every time the loop starts again, these conditions will be checked
call TriggerSleepAction(1) //--> wait 1 second
set udg_ChargeCounter = udg_ChargeCounter + 1 //--> ...
endloop //--> closes the loop (don't forget this!!)
If you get this to work, you can tell about yourself that you've used jass! :D
 
Level 11
Joined
Jul 12, 2005
Messages
764
Vars in jass has the same name as in GUI, exept, they have an 'udg_' part before them.
For example, if you have a variable in GUI called MyVar, it is called udg_MyVar in jass.
There is the action, Custom Script (somewhere between the firs few actions in the list). If you double click on it, you see an editable line.
The script you need has 5 lines, so you must have a Custom Script action for each line!
JASS:
JASS:
loop
exitwhen udg_ChargeCounter > 5 or udg_ChargeEnd == true
call TriggerSleepAction(1)
set udg_ChargeCounter = udg_ChargeCounter + 1
endloop
Here it s in GUI:
Code:
Custom Script: loop 
Custom Script: exitwhen udg_ChargeCounter > 5 or udg_ChargeEnd == true 
Custom Script: call TriggerSleepAction(1) 
Custom Script: set udg_ChargeCounter = udg_ChargeCounter + 1 
Custom Script: endloop
If you don't understand something, just ask![/code]
 
Status
Not open for further replies.
Top