- Joined
- Apr 6, 2008
- Messages
- 760
can a Module use Globals when implement in an other struct from the structs scope?
I wanna use this way to create casting bar for some spells, so with globals i can get the casting time and other stuff (customizeable for each spell we can say)
EDIT:
on other thoughts i could use a textmacro, but still is it possible?
JASS:
module Test
real a
real b
real c
method Math takes nothing returns returns real
set .a = A
set .b = B
set .c = .a * .b
endmethod
endmodule
JASS:
scope A
globals
private constant real A = 2
private constant real B = 3
endglobals
private struct Data
static method ASD takes nothing returns nothing
local thistype D = thistype.allocate()
call thistype.Math()
endmethod
implement Test
endstruct
I wanna use this way to create casting bar for some spells, so with globals i can get the casting time and other stuff (customizeable for each spell we can say)
EDIT:
on other thoughts i could use a textmacro, but still is it possible?
Last edited: