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

[Solved] Code/Tooltip

Status
Not open for further replies.
Level 3
Joined
Feb 18, 2011
Messages
11
Ok so I wanted to create a custom spell. I created a custom spell using Howl of Terror as a base, I made 4 lvls and created a damage reduction 60% at lvl 4. Now the original data was 45% and i cant change it to 60% by using <ANht,DataA4,%>%. I tried to remake this code with countless changes but it would always (in game) show 0 or any other number expect for 60 ( That's my desired data number ). Can anyone tell me how can I change this ( <ANht,DataA4,%>% ) code so it shows my desired data ? Thanks.
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
The tooltip tags are faulty. But anyway, you need to provide the new ability's id since the field you want to read from is there and not at the one you based the ability on (ANht).

To view it, press CTRL+D in object editor and take a look at this ability in the ability list on the left side, the 4 letters before the colon.
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
What Waterknight said <- This.

As you can see, the code has 3 parts.

JASS:
   1         2       3
<ANht |,| DataA4 |,| %>

1 - Is the rawcode of the ability. As WaterKniht said, press "Ctrl + D" and they will show in the object editor.

2- The name of the Data fields will change too. Instead of "Chance" may say "Data2".

3- % means that the Data will be multiplied by 100.

If you have an ability (A000) that has 0.2 chance to bash (Data1) and you want to display [Data1] in a percent (%) then you <A000,Data1,%>% and it will take Data 1 from A000 and multiply it by 100.

"20%" since 0.2 x 100 = 20.
 
Status
Not open for further replies.
Top