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

Custom Script Question

Status
Not open for further replies.
Edit: Oh no, I see now that you had an 2.post in which you asked the same; it already was answered.

Lol one can, had an idea cause of your request.

One needs to use that native:
JASS:
native GetAbilityEffectById         takes integer abilityId, effecttype t, integer index returns string

use for abilityId the unitTypeId of the Unit and for effecttype EFFECT_TYPE_MISSILE.
index 0 is attack 1
index 1 is attack 2.

looks that way in GUI.
  • Nahkampf-Initialisierung
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set UnitType = Zauberin
      • Custom script: set udg_String = GetAbilityEffectById(udg_UnitType, EFFECT_TYPE_MISSILE, 0)
      • Game - Display to (All players) for 30.00 seconds the text: String
      • Custom script: set udg_String = GetAbilityEffectById(udg_UnitType, EFFECT_TYPE_MISSILE, 1)
      • Game - Display to (All players) for 30.00 seconds the text: String
But wait there is an gui equavalance... but it limits to ability.
one could do a type conversion with custom script.
Cause unitType(Id) and ability(Id) are both integer in the end.
  • Nahkampf-Initialisierung Kopieren
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set UnitType = Zauberin
      • Custom script: set udg_Spell = udg_UnitType
      • Set String = (Art path of Spell Missile Art (index 0))
      • Game - Display to (All players) for 30.00 seconds the text: String
 
Last edited:
Status
Not open for further replies.
Top