! Global Variable

DK's Pride

New Member
Reaction score
7
How can i tell wc3 that its a global variable, and cant be found in this trigger, but in another one? :confused:

Cause it cant find them, if i just write the name of the global variable.:(
 

UndeadDragon

Super Moderator
Reaction score
447
udg_varName?
 

ZakkWylde-

New Member
Reaction score
14
Not sure if this is what you mean...but if you declare a global in a trigger

JASS:
globals
real r
endglobals


then to access that global from another trigger, you simply put [the name of the trigger]_[name of global variable]

so if i decaled my global variable -- real r -- in a trigger named GlobalDecl

then, to access that from another trigger, i'd say GlobalDecl_r.

Hope it helps

EDIT: If you create a variable using the variable editor or whatever it is (and not in JASS script), then you call it by udg_variablename.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top