Hi I'd greatly appreciate help creating either a GUI or jass system to create (and ideally destroy) wisp wheels. A wisp wheel is basically a bunch of units that rotate radially around a point. Usually its some amount of wisps going in circles around the same point. One of the tricky parts is that there are different levels of these wisps which must be moving in conjuction with the inner level. So for a 3 level wisp wheel that has 5 wisps in each level, there would be the first level that is a distance r from the center point that contains 5 wisps that are evenly spaced. In the second level there are 5 more wisps a distance r from the first level moving much faster than the first level in order to stay in sync. Third level follows the same pattern.
The parameters for this method/function include the number of wisps per level, the number of levels, the distance between each level, and the speed of the wisps. Kattana used to have a system for doing this - one that was pretty completely destroyed by the patch. I don't have the slightest idea how to fix his work, but if anyone does I'd be very grateful. It can be found here: http://www.wc3jass.com/viewtopic.php?t= ... sc&start=0
Where implementing a wisp wheel using Kattana's system was just:
function CreateWispWheel takes unit center, integer spokeId, player owner, integer spokes, integer length, real degreeIncrement, real distanceIncrement, real dpi returns nothing
wisp wheel
Moderator: Cheaters
-
- Spice Pirate
- Posts: 862
- Joined: January 29th, 2009, 5:35 pm
- Title: LHC
- Location: Canada
Re: wisp wheel
If you wanna use his, just change this:
To:
Code: Select all
function H2I takes handle h returns integer
return h
return 0
endfunction
To:
Code: Select all
function H2H takes handle h returns handle
return h
endfunction
function H2I takes handle h returns integer
call H2H(h)
return 0
endfunction
Spoiler:
-
- Newcomer
- Posts: 3
- Joined: June 18th, 2009, 2:21 am
Re: wisp wheel
Aha, thats much easier, thankyou very much and I will give ye my first born child
-
- Newcomer
- Posts: 3
- Joined: June 18th, 2009, 2:21 am
Re: wisp wheel
With the unfortunate downside that the code still won't compile. It grabs an error here:
with the error coming up on endfunction for being invalid type for specified operator (there are a bunch more errors but I'm hoping the majority of them go poof)
Also tyvm once again for anyone willing to help.
Also, because it might help, here is the full code:
Code: Select all
function GetHandleUnit takes handle subject, string name returns unit
return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
return null
endfunction //Error here
with the error coming up on endfunction for being invalid type for specified operator (there are a bunch more errors but I'm hoping the majority of them go poof)
Also tyvm once again for anyone willing to help.
Also, because it might help, here is the full code:
Spoiler:
-
- Forum Staff
- Posts: 811
- Joined: January 1st, 2008, 12:58 am
Re: wisp wheel
Instead of abusing the bug, just try GetHandleId()
Wanna learn to hack maps? --> Guide
-
- Spice Pirate
- Posts: 862
- Joined: January 29th, 2009, 5:35 pm
- Title: LHC
- Location: Canada
Re: wisp wheel
Oh, nope, that won't help... Each of the functions like that use the old return bug such as returning an int for a unit. First add this to the top:Then change each of the functions like the one you posted to:Once you do that, it should work like a charm maybe.
Code: Select all
function I2I takes integer i returns integer
return i
endfunction
Code: Select all
function GetHandleUnit takes handle subject, string name returns unit
call I2I(GetStoredInteger(LocalVars(), I2S(H2I(subject)), name))
return null
endfunction
Spoiler: