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

[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