• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[JASS] Referencing to Ability table

Status
Not open for further replies.
Level 2
Joined
Jul 31, 2007
Messages
21
I'm looking at trying to reference to a specific slot of an ability on its data table(AEev [Evasion] and DataA1 [the value of its effect]), so that I can put its value into an integer variable and vice versa. Any ideas as to what the function would be to call this up?

I've been using GUI mostly up until now(I've had a few encounters with playing with JASS and other progging languages), but I know it won't be able to do even half the stuff I'm wanting to do with the map I'm currently working on with just GUI, so I'm trying to do everything in JASS. Sooo much more efficient than GUI, even if it does make my head hurt a bit.
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
It's easy enough to reference an ability itself (eg: A000 in the Object Editor would be 'A000' (as an integer) in JASS)

However, you can't access specific slots of the data field of an ability (with the exception of the Effect Art for the various Effect fields) via JASS.

Thus, if you really want to be able to get data from the object data, just do something like this:

Say your ability is Storm Bolt

Find an Effect it doesn't use

(in this case, Area of Effect Art)

Now, list all the data in here.

Eg: the table may look like

5
42
A000
Footman
Cheese
666
1337

Then, to get the data back, just use

GetAbilityEffect (almost definately sure that's the function name), with the proper params (your spell's rawcode, the position on that list, and the effect type (I think it's called EFFECT_TYPE_AREA_OF_EFFECT for AoE.))
 
Level 2
Joined
Jul 31, 2007
Messages
21
Mmm. It's not so much that I need to be able to extract the data from the table at some point(though the idea I'm sure will come in handy at a later date), but rather that I need to import data *into* the table based on map events. A shame it's not possible. :(

Luckily, however, I can still do the original idea I had using another method, although it's a pain-in-the-bum, roundabout way. I just wished this could have worked out; would have saved me a buttload of scripting.

Thanks =)
 
Status
Not open for further replies.
Top