View Single Post
Old 09-17-2011, 07:13 PM   #4
Yrth
User
 
Yrth's Avatar
 
Join Date: Jul 2010
Posts: 76

Yrth has little to show at this moment (4)

Default

Quote:
... but there is always the high chance that I misunderstood your question. :P But if you are curious about strictly speed, the global block will be faster. It really depends on what you are doing as to which one you will use. If you are questioning structs vs using globals and doing all the work yourself, then I say you should just opt for structs because they were made for a reason. =) However, if you don't need a struct, then don't use one.
nope i think u got what i meant. ive got like 16 different global arrays that could all be put inside one struct. it just seemed like it might be much easier/more organized
i still might since 2 array lookups isnt really worth caring about
especially since doing it that way would make object oriented jesus cry :(
thank you very much for ze info's


Quote:
The code you posted should already do that. I don't see where the problem is.

it doesn't like me calling LevelGroupHook from the ForGroup call
Collapse JASS:
call ForGroup(LevelGroup, function Level.LevelGroupHook)
Collapse JASS:
private method LevelGroupHook takes nothing returns nothing
            call LevelRegionEntry(GetEnumUnit())
        endmethod
i could call LevelRegionEntry() and make a local to get the enum unit, but that would have the same problem. i need to retain the specific information of the struct.

the error is LevelGroupHook is not an static method of Level that takes nothing.

Quote:
As for your wait question, I think you can't use TriggerSleepAction in timer callbacks at all. Use a timer instead.
ok well if i do that i should probably really start using timer utils
so if someone would do a crash course with me that'd be awesome

if i have timerutils should i always create timers through it?
can i release timers that weren't made with timerutils?
whats the easiest way to get the integer value of a handle? i'm assuming thats the main point of the data attachment feature, pls correct me if i'm wrong.
or wait, is it possible to flat out attach a struct to a timer?
Yrth is offline   Reply With Quote