• 🏆 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!

Looking for World Editor enhancements/a method to help me do this faster

Status
Not open for further replies.
Level 5
Joined
May 20, 2008
Messages
138
  • Set HDRUID_RegrowthTarget[(((Player number of (Owner of (Casting unit))) x 10) + (Player number of (Owner of (Target unit of ability being cast))))] = (Target unit of ability being cast)
  • Set HDRUID_RegrowthTicks[(((Player number of (Owner of (Casting unit))) x 10) + (Player number of (Owner of (Target unit of ability being cast))))] = 0
Hello! Look at the variable arrays[] above. Imagine setting the data in the square brackets for each of those variable arrays. Imagine that you are going to need about 25 differen variable arrays with the exact same information in the square brackets. Pretty daunting, huh?

My problem is that when I copy one of the variables and change the variable to another variable array, the information in the brackets [] is reset and needs to be re-entered, and that is quite a lot of things to pick from the labyrinth of menus that is the GUI trigger editor.

Is there any world editor enhancements or any method that allows me to change the variable but keeping the informaton in the brackets so I don't have to re-enter all that stuff 25 times?
 
Level 5
Joined
May 20, 2008
Messages
138
You can learn JASS and use your keyboard to do all this. But you'll have to learn JASS

It would be enough if you taught me the custom script for setting a variable ;)

then I can write one custom script, copy it and manually change the text of the variable name while keeping the info in the brackets

Thanks a bunch if someon finds a solution to this!

EDIT:
Set it as an integer variable and then use it filling up the index? :S

wat? :p
 
Level 5
Joined
May 20, 2008
Messages
138
E.G.
  • Set Integer1 = (((Player number of (Owner of (Casting unit))) x 10) + (Player number of (Owner of (Target unit of ability being cast))))
  • Set HDRUID_RegrowthTarget[Integer1] = Target unit of ability being cast

You are... a pretty smart guy :p I just have to ask, will my spell still be MUI and MPI if I use the integer variable or do I have to make it local for this to work? +rep for you in any case

Copy your trigger, convert it to custom script and you will see the line. Remeber to keep the udg_ prefix in the script

Thanks an awesome bunch! This seems to be working and hopefully I wont accidentally break my triggers with this method :p +rep for you!
 
Level 5
Joined
May 20, 2008
Messages
138
Well, make it MUI, ha? MPI is going to be for sure, since it is consisted of the event response "Owner of (X unit)". For MUI, even the naked value wouldn't render this trigger MUI-enhanced, cause MUI is based off increasing values, e.g. Value = Vale +1, not Player values to define the array index.

Woah, slow down :p If it seems like I am totally ignoring your explanation now, it is because honestly I didn't understand much of it :p What I meant anyway, was that if two units (belonging to different players even) cast the spell simultaneously (fat change that that will happen anyway but still, maybe some people happen to be lucky and get of their casts a nanosecond after each other) on different targets, will the same integer variable changing affect the spells in anyway (like that they might bug or anything)? I am not having any waits in between setting and using the integer variable.
 
Status
Not open for further replies.
Top