| 02-01-2008, 12:41 PM | #1 |
Is there really that much difference between handle system? Should I not be using just the regular old Local Handle Variables System?. If not, which would you recomend? |
| 02-01-2008, 12:53 PM | #2 |
Handle Systems Suck Balls. |
| 02-01-2008, 12:57 PM | #3 |
What should I be using instead then? |
| 02-01-2008, 01:12 PM | #4 |
cohadar will always say most of the system out there suck balls when it is not ABC btw, try vex's caster system and CSCache, one of the things I'll never miss in my map |
| 02-01-2008, 02:57 PM | #5 |
@zen87: Right on man! lol, but this time cohadar is right, some of LHVS functions sucks. @Antiquities: you can use Local Handle Vars, use only functions that store integers, but use it with arrays, store only array indexes, that would be better |
| 02-01-2008, 03:56 PM | #6 |
Well, I recently learned Handle Vars, then I heard about structs. I'm telling you, man, a system using structs such as Cohadar's ABC are the way to go. However, depending on what it is you are doing you may need more than one system. Cohadar's ABC is designed to attach things ONLY to timers. If you need to attach other things, you will need to look at other systems. Normally you are attaching things to timers anyways, so this is not a problem. |
| 02-01-2008, 04:39 PM | #7 | |
Quote:
If you want something safe and versatile, use CSCache and attach to the required object the struct index. Teh example://This example uses CSSafety to manage timers and Kattana's handle Vars to pass data to other functions struct Data unit u real v1 real v2 static method create takes unit u, real v1, real v2 returns Data // method used to create and add the data in one line of code local Data D = Data.allocate() set D.u = u set D.v1 = v1 set D.v2 = v2 return D endmethod endstruct function Loop takes unit u returns nothing local timer t = GetExpiredTimer() local Data D = Data( GetHandleInt(t, "Data") ) //retrieves the data from the timer // do your stuff... endfunction function Actions takes nothing returns nothing local Data D = Data.create(GetSpellTargetUnit(), 100., 45.) local timer t = NewTimer() call SetHandleInt(t, "Data", integer(D)) // here, you attach the struct to the timer by setting the Data index... call TimerStart(t, 0.1, true, function Loop) set t = null endfunction |
| 02-01-2008, 05:59 PM | #8 |
First of all ABC can attach to timers, triggers and dialogs. And for some timers it is better to use TT than any other systems. As for units PUI cannot be matched. |
| 02-01-2008, 07:05 PM | #9 | |
Quote:
This is true, however, you've said it yourself that you should only attach things to timers starting on v4.6. In v5.0 you made functions for triggers and dialogs, but you never said you should use them, or at least didn't edit your previous statement to say you should. Off-topic: Cohadar, I have some code I'd really like you to tear to pieces and tell me what I'm doing wrong. It works as far as I can tell, but I'm not sure I'm doing thing properly. I've only recently learned structs, so I am sure I have made mistakes. I need someone who can set me straight without all the fluff or fear of offending me. From reading various threads here, you are quite the orc or troll PM me if you will do it and I'll send you the code. |
| 02-01-2008, 07:29 PM | #10 | |
Sometimes KaTTaNa's Local Handle Variables leaks gamecaches. The main function in some versions looks like this: JASS:function LocalVars takes nothing returns gamecache return InitGameCache("JASSLocalVars.w3v") endfunction Quote:
|
| 02-02-2008, 10:02 AM | #11 | |
Quote:
Sorry I don't give free advice. I like to charge my knowledge in bashing, so if you have any questions ask them in jass thread and you will receive a decent mix of bash and good advice. |
