| 11-22-2007, 01:40 AM | #1 |
Its been 4 months since I've visited the forums or touch the WE. Can I get a brief highlight of the new "discoveries"? I.E. Are structs still the best solution for timers? Any other alternatives to handles? |
| 11-22-2007, 01:42 AM | #2 |
I believe so, just NewGen and maybe some other tools/resources. |
| 11-22-2007, 06:51 AM | #3 |
Cohadar has been going crazy with his "ABC" system. It seems to be quite the rage. |
| 11-22-2007, 07:11 AM | #4 |
Now that you mentioned it I have ABC version for Mac, you interested? |
| 11-22-2007, 07:24 AM | #5 | |
Quote:
.. .structs are not a solution for attatching to timers, unless you do something like vex's timelib or whatever he called it. Structs simply allow you to attatch a single native type (integer) which can be used to hold more than a single value as well as lacking I2H calls. Alternatives to handles...? i hope to god you mean HandleVars, and if so, there are alternatives. You could use HandleVars to store structs on handles, but there are better solutions, like grim's data system: http://wc3campaigns.net/pastebint.ph...3ffd04408ae7e1 As for new discoveries... in the past 4 months? Not many if any significant ones i can think of. |
| 11-22-2007, 07:35 AM | #6 | |
Quote:
Second, even if I wanted to use your ABC system... I can't use structs anyway so there's no point! Edit: I guess I could use it instead of CSData for attaching some dynamic arrays... but that still doesn't make too much sense. |
| 11-22-2007, 07:45 AM | #7 |
You got stuck with external jass compiler I guess? You really need to get a PC. |
| 11-22-2007, 08:04 AM | #8 |
Running JASSHelper on my Virtual Machine is apparently bugged. Don't know why, but it just spits errors out when parsing the code. |
| 11-22-2007, 03:10 PM | #9 | |
Quote:
JASS:struct Unit unit u endstruct function MyCallback takes integer tag returns boolean call KillUnit(Unit(tag).u) return false // Return true to repeat the timer, false to not. endfunction function MyFunction takes nothing returns nothing local Unit u = Unit.create() set u.u = CreateUnit(...) // Execute the callback function in 10 seconds, passing the integer to it as a paramiter. call TimedEvent(10.0, integer(u), Callback.MyCallback) endfunction JASS://! runtextmacro DataDeclare("Data","integer") struct Example integer value endstruct function B takes unit u returns nothing local Example e = GetData(u) local integer i = e.value // ... endfunction function A takes nothing returns nothing local unit u = CreateUnit(...) call SetData(u, integer(Example.create())) call B(u) endfunction are you just naming your structs "units"? Its confusing me a bit |
| 11-22-2007, 03:38 PM | #10 |
yes he just named the struct Unit which was a but confusing. Should be called "UnitPointer" or something. |
| 11-22-2007, 07:03 PM | #11 |
You're not too late for the little school of ABC at least. ![]() |
| 11-22-2007, 07:58 PM | #12 |
I give "Certified JASS Pro" degree after you graduate. That is IF you graduate. ![]() |
| 11-22-2007, 10:28 PM | #13 |
What is PUI? |
| 11-22-2007, 10:30 PM | #14 |
Well read the thread and see. Download the map and try. Try to use and learn. |
