|
|
|
|
Trigger (GUI) Editor Tutorials Contains tutorials concerning the usage of GUI features. Read the Rules before posting. |
 |
08-05-2012, 04:56 AM
|
#1 (permalink)
|
|
Oh Data Structures <3
Join Date: Apr 2012
Posts: 3,005
|
Charged Ability Tutorial
Charged Ability Tutorial By: Radamantus | | What is this? | Answer: This is a tutorial of how to make an ability with a charge.This allows you to cast the ability many times even without cooldown but has limits and allows you to not duplicate a spell many times and use the action "Add blahblah to blahblah" and"Set Level of blahblah to blahblah". | | How can we make it? | Answer: The ability triggers include of 4 parts:Initialization,Learn,Cast,Loop. We will start first in Initialization
We create first the hastable,either of the two you can use:
or
 Custom script : set udg_Hash = InitHashtable() There we have it.
Now,we will use some configuration for our spell.
We will start first with the charges color.
I will choose 4 charges as a max charge so that we could use the colors red,orange,yellow,green and if empty black.If you want other colors go here: Warcraft III Color Tags And Linebreaks
There you have it.Next we will use the Floating Text.I will use letter "I" so that we could easily see the Charges.
There,so the charges will look like this:
I I I I I I I I I I I I I I I I I I I I
After that,we will use the time to make a new charge.Lets use 5 as a cooldown.
 Set ChargeCooldown = 5.00 Now,Let's Put the Starting Charge when learned and the charge number when the learner dies.
 Set StartingCharge = 1 We are now finish with the Initialization,The trigger will look like this
 Initialization Now let's conclude with the Learn Trigger.This is the shortest trigger here.
Let's make the events and conditions.
 Learn After that,we will put some important variables.Let's Start with the key(hashtable)
Now,let's save the variables to the key.
The timer will be used for the looping action of the cooldown.
Next,let's start the loop.
Now we are finish with the Learn Trigger,2 more triggers to go!
Here is what the trigger will look like:
 Learn Now let's start with the Loop.
So first let's start the loop event.
You could use either 0.03 or 0.04,but ill prefer 0.04.
Now, for the actions.Let's first pick the group
 Unit Group - Pick every unit in LoopGroup and do (Actions)   Loop - Actions Now,let's load the variables,but first we will create the key.
Now,Loading Variables
Let's Check if the Picked Unit is Alive,if alive then:
Now,let's put the actions for the Then Actions.We will start first with the floating text
  Then - Actions There we have it,next we will hide the Floating Text from the Enemies so they wont know that you have any charges left.
Now,lets conclude with the charge cooldown.
Now,lets make the Else Actions of the Main If/Then/Else
  Else - Actions Note:Don't Clean the child hastables or else it will bug!
End of Loop Trigger:
 Loop Now let's Start with the Cast Trigger
First we will put the events and conditions.
 Cast Then The Actions of the Trigger
We will start first with loading and setting important variables.
Now,let's check if the charges is not 0 or empty.
  If (All Conditions are True) then do (Then Actions) else do (Else Actions) Now for the Then Actions
  Then - Actions Now for the Else Actions for the Main If/Then/Else
  Else - Actions Now we are done with the Cast Trigger.
Here is the overall trigger:
 Cast For the Demo Map:
Shadow Shroud v7
Ask any questions if you wanted to. |
__________________
 |
| " Im too fabulous for this shit " |
|
|
|
|
08-05-2012, 09:57 AM
|
#2 (permalink)
|
|
Oh Data Structures <3
Join Date: Apr 2012
Posts: 3,005
|
Notes:
Ability icons for the charges are very complex and uses MANY gui triggers and Jass Codes.
I Prefer to use this one for a charged spell due to that this is easier than icon replacement.
__________________
 |
| " Im too fabulous for this shit " |
|
|
|
|
08-06-2012, 01:23 PM
|
#3 (permalink)
|
|
JESUS MAN
Resource Moderator
Join Date: Dec 2008
Posts: 5,700
|
^No, it's just an array of abilities that you have to add and remove.
|
|
|
08-06-2012, 01:38 PM
|
#4 (permalink)
|
|
Mr. GUI
Join Date: Jun 2011
Posts: 1,761
|
My bad just checked the name, but then its good :)
__________________
| mysig |
Tutorials |
My Spells/Systems |
|
|
|
Last edited by Chaosy; 08-10-2012 at 09:32 AM.
|
|
|
08-10-2012, 08:54 AM
|
#5 (permalink)
|
|
Oh Data Structures <3
Join Date: Apr 2012
Posts: 3,005
|
Uhmm,about that sir,its not about the spell with "charging" or some sort of knockback.It is about an ability just like items with limits
Please read how the spell works first.
About that Mag,it will take me 10 triggers and repeating them due to the icons.It will be a pain in the object editor
__________________
 |
| " Im too fabulous for this shit " |
|
|
|
|
08-10-2012, 09:32 AM
|
#6 (permalink)
|
|
Mr. GUI
Join Date: Jun 2011
Posts: 1,761
|
sorry my bad :P
__________________
| mysig |
Tutorials |
My Spells/Systems |
|
|
|
|
|
|
08-21-2012, 10:13 PM
|
#7 (permalink)
|
|
ʕ•͡ᴥ•ʔ
Resource & Tutorial Moderator
Join Date: Nov 2006
Posts: 3,548
|
Nice job. Everything seems in order to me. Sorry for the late response.
~Approved.
|
|
|
09-25-2012, 08:57 AM
|
#8 (permalink)
|
|
Forgot how to vJASS
Join Date: Sep 2009
Posts: 394
|
whoa I've been figuring out how to do this, finally ahahahha thanks for this :3 rep+!!!!!
__________________
|
|
|
11-19-2012, 02:45 AM
|
#9 (permalink)
|
|
Learning C++
Join Date: Nov 2012
Posts: 113
|
Haha! this one is too complex for me. But later on i guess this will be useful. I got so many ideas about charged spells :)
__________________

|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|
All times are GMT. The time now is 05:40 PM.
|