• 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.

Quick help! Need to know how to make Skill Levels {detecting ability levels}

Status
Not open for further replies.
Level 4
Joined
Sep 30, 2007
Messages
95
HEY! :D

I am making a spell (triggered)
And its a hero ability.

I can make the entire effect on trigger but how do i devide them into levels?
Like level 1 = 300 damage.
Level 2 = 600 damage.

i have seen alot of toturials where they show (Level of Ability equal to X), Can somebody please show me what section on the triggers i can find it?


+REP
 
Level 10
Joined
Sep 6, 2008
Messages
423
Here is an example from my own map, I use a Integer variable where the base of the damage is and when I deal the damage I take the SpellDamage variable multiplied with Real((Level of ability of unit)) where the ability is what triggers the whole thing. Hope this helps.

  • Spirit Crush
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Spirit Crush
    • Actions
      • Set TempLoc = (Target point of ability being cast)
      • Set SpellDamage = ((Agility of (Triggering unit) (Exclude bonuses)) / 5)
      • Unit - Move (Triggering unit) instantly to TempLoc
      • Animation - Play (Triggering unit)'s attack animation
      • Animation - Reset (Triggering unit)'s animation
      • Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing ((Real(SpellDamage)) x (Real((Level of Spirit Crush for (Triggering unit))))) damage of attack type Spells and damage type Normal
      • Unit - Set mana of (Target unit of ability being cast) to ((Mana of (Target unit of ability being cast)) - ((Real(SpellDamage)) x (Real((Level of Spirit Crush for (Triggering unit))))))
      • Special Effect - Create a special effect at TempLoc using Abilities\Spells\Undead\ReplenishMana\ReplenishManaCasterOverhead.mdl
      • Special Effect - Destroy (Last created special effect)
      • Custom script: call RemoveLocation(udg_TempLoc)
EDIT: when you use the "Unit - Damage Target" and want to base the damage of attributes or what level the ability is you need to use "Conversion - Convert Integer to Real"
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,255
JASS:
native GetUnitAbilityLevel takes unit whichUnit,integer abilcode returns integer
//
//
That native returns you the level of the whichUnits abilcode ability.

If you mean in GUI, then you have to do a stupid type conversion as damage is axcepted as a real yet the ability level is an integer. Thus you need to do your arthmetic action and in one of those parts you use an Integer to Real actions to allow ou to chose the get level of ability for unit action.

I would advise the JASS method as JASS parses integers automatically as reals so no stupid conversions are needed if you want to use one as a real.
 
Level 4
Joined
Sep 30, 2007
Messages
95
Cool, im trying^^

Can you show the full way on GUI?
Ect: Configure Condition -> Integer -> String -> Real

EDIT: Proplem not Solved yet
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,255
JASS:
damage = GetUnitAbilityLevel(yourunit,'0000')*300 
//
//

damage can be both real or integer and yourunit gets replaced with a reference to the unit who's ability you want to get the level of. 0000 gets replaced with the raw object data value of your ability.
After that you use damage like any normal real / integer,

Honestly, how can you not get this? Both the GUI and JASS ways are explained now.

leet.firefox, multiple selection is a very stupid and unefficent way to make a spell, never reccomend it to people unless the spell can not be done with out it.

BoboJazz, its an Integer action, it can only be found under whole number (integer) fields in GUI. If the field axcepts a real (decimal) then you need to use the conversions of integer to real so it is an integer field so you can choose it. That is why GUI is stupid as in JASS both reals and integers can be used as reals with no conversion and GUI saves into JASS.
 
Status
Not open for further replies.
Top