• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Ability variable

Status
Not open for further replies.
Level 3
Joined
Oct 1, 2018
Messages
63
Is there a way to save Abillitys in variables? Im playing around of how to make an Blue-Magican from Final Fantasy, wich learns abillitys from enemys in different ways.

Im not complet sure for now wich event i use in the end to learn the abillity, but thats not my problem. I just cannot dicide that for now.

My problem is, that there is no Variable-Type to save an "abillity being cast", nor an condition like "unit has (ability)". It would be very useful for Dialogs, wich questions the player if an abillity should be overwritten. (Buttonposition stuff)

My warcraft isnt patched, im still
waiting for lan. I dont know if such an Variable-Type exists in the patched version, so im asking for a way to work around.

Is it possible to save the abillity via Jass code into string variable or something?
Any good Idea could help me.
Im still brainstorming, hope there is any short way.

Edit:
Here is what i have got for now:
An Blue-Magican with the Abillity "Dragonic" (FFX).

Im using Thunderbolt as Dragonic.

The use of Dragonic allowes to learn abillitys from the target unit. If you cast it on Necromancer and dryad, you may notice, that each time the ability learned from them gets overwritten. This is exactly what i want, but the way how it works is far to long.
Here are my Triggers and Map.
 

Attachments

  • Dragonic.jpg
    Dragonic.jpg
    110.3 KB · Views: 55
  • EditAbility.jpg
    EditAbility.jpg
    207.2 KB · Views: 38
  • (1)BlueMagican.w3x
    14 KB · Views: 20
Last edited:
Level 39
Joined
Feb 27, 2007
Messages
5,016
Abilities are just integers, as draco implied, and you can manipulate them as such with JASS (GUI won't let you because it thinks Ability != Integer). There are also Ability type variables you can add in the GUI variable editor that are also just integers, and they have been there as long as I can remember so you must be running a really old WC3 version. In this instance you would probably be best served by saving information about what units give what abilities into a hashtable on map init, and then reading from that hashtable when the unit wants to steal their spell... but if you are on an old WC3 then you definitely won't have access to hashtables. Your only option is the big if tree.
 
Level 3
Joined
Oct 1, 2018
Messages
63
@Pyrogasm
Thanks for the advice using hastables. On the Wc3/Tft-CD is one very old patch. I have acces to hastables, blizzard grand prix, the firelord and so on. I dont know if there is something missing but sometimes it feels like. I have version 1.18

The patch on the cd is the only one i could use. I have of course tryed to download one with my phone but was unable to open blizzard homepages. So i tried patches from other sites wich endet in CD-missing error. Its wired. I had to deinstall and install. Guess i just have to wait for lan.

But that hastable thing i will try. There are good looking Tutorials about this theme on Hive.
 

Wrda

Spell Reviewer
Level 26
Joined
Nov 18, 2012
Messages
1,889
That doesn't make any sense, how can't you have the "Ability" type variable if you have TFT, even if you didn't have it, ROC has it. The CD has a patch and it can be updated just by going battle.net so I don't understand why you would even go download one on blizzard homepages or go to other sites. Either I am missing something or this smells fishy.
You can't ever have more than 1 ability of the same base in the same unit, like your chain lightnings, it won't work.
 
Level 3
Joined
Oct 1, 2018
Messages
63
@Wrda

Crap damn jes!
I have just overseen the Ability-Variable. Im very sorry for this mistake of mine. I wasnt trolling you i swear!:oops:

And with the battlenet:
Scince i dont have Lan jet i just dont have internet acces with my pc. But that doesnt matter anymore. Im off building an Bluemage system if i can.
See ya.:)
 
Status
Not open for further replies.
Top