Variable Question

Crusher

You can change this now in User CP.
Reaction score
121
Let's say that I cast 4 different spells at the sime time with totaly different effects.

Finger of Pain - Coded in GUI
Entagling Roots - Coded in JASS
Firebolt - Coded in GUI
Blizzard - Coded in JASS

Althought this doesn't make sense at all, they are using ''TargetLoc'' Point Variable which can be used to set ''Target Point of Ability being Cast'' in GUI and JASS.

My Question is:

If I remove ''TargetLoc'' after finishing one spell, will ''TargetLoc'' work in next spell I cast in almost same time?
 

Skippy

Active Member
Reaction score
39
Engine of Warcraft is linear. That means NOTHING can happen at SAME time.
So the answer: it will work :)
 

Crusher

You can change this now in User CP.
Reaction score
121
Are you 100% sure? I have tons of triggers, eg. Variables which I want to remove, I'll use just one for all of them.

Once someone else confirms, I'll get started.
 

Shura

New Member
Reaction score
45
Using the same variable for multiple abilities is fine, as long as there isn't any waits.
 

tooltiperror

Super Moderator
Reaction score
231
When you add in a wait, there is the chance two spells will use the variable and eff up.

I suppose if arrays were limitless, you could make a separate array for every single unit, and like, just use an array to handle each unit?

Or, do AIDS and Hashtables already do that for you?

Edit: Also, instant code fires in a line.
 

Sim

Forum Administrator
Staff member
Reaction score
534
Technically, you could use the same point variable in every code without waits.

Practically, though, you're better off with either locals or private struct variables. :)

Also, I'm bettin' one of these days you're gonna forget about the fact that using the same global variable for everything doesn't allow waits. And you will use a wait. And then wonder the hell's happening. :nuts:
 

tooltiperror

Super Moderator
Reaction score
231
Technically, you could use the same point variable in every code without waits.

Practically, though, you're better off with either locals or private struct variables. :)

The simple solution is JASS.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top