Tutorial Tips 'n' Tricks With Wisp Wheels

I

IKilledKEnny

Guest
Tips ‘n’ Tricks with Wisp Wheels​

~By IKilledKEnny~


I have read other tutorial about wisp wheels, what got me interested in them; however I found it minimal and inefficient in some cases so I have decided to give my best shot.

You must have some experience with World Editor, this is not meant by all to new mappers as we use some advanced stuff (well not really, but things that might be hard to new people, however if you want to give it a shot go a head, I hope you will enjoy ;) ), no JASS needed, I tried to do everything in GUI (pretty hard once you get addicted to JASS ;P).

I tried to make it the triggers the simplest way possible, but also the shortest possible, I use many globals, more then needed, just to keep things clear, you could probably use less.

Note: I tried to make everything neat, however many people define neat as something different, for example I like to get all information into local variables before I go on to the trigger itself, however I know someone who like to keep minimal information in variables as it confuses him. Anyway you can do everything in other way if you find my way too messy.

Basics:

So first of all the basics.

Wisp wheels represent few units or special effect that go around a certain location.

Code:
        X

X       L       X
                                                   
        X

So for example this can be our units/special effects starting location and what will do is basically rotate them around L (stands for location).

How do we achieve this?

We simply keep changing the units’/effects’ angle compared to L (and possibly the range).

What we basically do in each trigger is get the units’/effects’ angle and range from L, and by that we can understand their location, and get a new location while basing it on the units’/effects’ current location and then moving them to the new location.

From now on I will refer both effects and units as units if you don’t mind, unless I have to make sure you understand I’m talking about effects.

When we are talking about units we will simply move them (using Move Units (Instantly) = SetUnitPositionLoc(takes unit, takes location) however when we want to use effect we will create new ones and destroy the old ones, so it would seem just like we are moving them around.

Note: I will clear leaks however there are not the subject of this tutorial so I’m not going to explain that part, leaks removing is a basic thing you should know when working with World Editor so I expect you to know it.

Also Note: I don’t want to go into stuff that are too advanced, thus I expect you know where L is easily. It can be a unit that move around but then make sure you get the unit inside a global so you could get it’s position whenever needed.

Basic Triggers:

Let’s start then.

First of all we’ll need globals. Let’s start with the first one.

Set NumberOfUnits = 6

Integer variable, no array as you can see. Why do we set it to 6? No reason, just an example, change it to the number of units/effects you want to have.

Note: By units/effects I means the things that will rotate around the L if that wasn’t clear to you yet.

Now create unit/effect variable (I’ll call it units)with array equal to NumberOfUnits (6 in my trigger). For now let’s keep them nulled (with no value).

If you want L to be a position of a unit make sure you got that unit in a separated unit variable.

Now, let’s create a point global that will represent L (surprisingly I’m calling it L).

Also another point global with array equal to NumberOfUnits (I’ll call that X).

Yup that’s much more then we need, but it will be proved useful, you will see that it will simplify things.

So let’s being a trigger with some event (say elapsed time = 5.00 seconds)

So lets set L to what we want.

Set L = (Center of (Entire map))

I just got L as a random location, in this case the center of the map.

Now let’s create another real global and call it StartingAngle.

Set StartingAngle = (360.00 / (Real(NumberOfUnits))) // 60 in our trigger

And we want also to get the distance right? Create real variable. Call it Distance (or whatever) and say that it will be 400 in our examples, deal?

Set Distance = 400.00

And now let’s create the rotating units.

Code:
For each (Integer A) from 1 to NumberOfUnits, do (Actions)
    Loop - Actions
        Set X[(Integer A)] = (L offset by Distance towards (StartingAngle x (Real((Integer A)))) degrees)
        Unit - Create 1 Footman for Player 1 (Red) at X[(Integer A)] facing L
        Custom script:   call RemoveLocation(udg_X[bj_forLoopAIndex])

We get NumberOfUnits points each time we change the angle but we keep the distance the same.

And after that we remove leak.

Note: I’m doing a regular wisp wheel, in others you might want the distance to vary.

So the trigger should look like this so far:

Code:
 Untitled Trigger 001
    Events
        Time - Elapsed game time is 5.00 seconds
    Conditions
    Actions
        Set NumberOfUnits = 6
        Set L = (Center of (Entire map))
        Set StartingAngle = (360.00 / (Real(NumberOfUnits)))
        Set Distance = 400.00
        For each (Integer A) from 1 to NumberOfUnits, do (Actions)
            Loop - Actions
                Set X[(Integer A)] = (L offset by Distance towards (StartingAngle x (Real((Integer A)))) degrees)
                Unit - Create 1 unit for player at X[(Integer A)] facing L
                Set units[(Integer A)] = (Last created unit)
                Custom script:   call RemoveLocation(udg_X[bj_forLoopAIndex])
        Custom script:   call RemoveLocation(udg_L)

WE create 6 units at 6 different angles from L with an equal distance.

For effect just switch this line:

Unit - Create 1 unit for player at X[(Integer A)] facing L

With

Special Effect - Create a special effect at X[(Integer A)] using string

And

Set units[(Integer A)] = (Last created unit)

With

Set effects[(Integer A)] = (Last created special effect)

Easy? Yes.

Note: Remove L only if it easy to re-receive the L’s data.

Now let’s check the rotating it self. Create trigger with every 0.03 event.

Create another global point again, array can help but it's not a must. I called it destination.

Real called Angle and if in your wisp wheel the distance is going to change then create another global to represent the distance.

Now first let’s get again L.

Set L = (Center of (Entire map))

And start another loop

For each (Integer A) from 1 to NumberOfUnits, do (Actions)
Loop - Actions

Let’s get units’s positions inside a variable.
Set X[(Integer A)] = (Position of units[(Integer A)])

Ok now we need to compare X to L

Set ChangingDistance = (Distance between L and X[(Integer A)])
Set Angle = (Angle from L to X[(Integer A)])

Now we know how far X is from L and what is the angle between them.

Set Angle = (Angle + 3.00)

We change angle’s value, I used 3 as an example. You can also change distance.

Set ChangingDistance = (ChangingDistance + 3.00)

Now we do:

Set Destination = (L offset by ChangingDistance towards Angle degrees)

Remove leak quickly:

Custom script: call RemoveLocation(udg_X[GetForLoopIndexA()])

Reset X

Set X[(Integer A)] = Destination

Remove another leak:

Custom script: call RemoveLocation(udg_destination)

And then move unit.

Unit - Move units[(Integer A)] instantly to X[(Integer A)]

Finally remove last leak

Custom script: call RemoveLocation(X[GetForLoopIndexA()])

Do same thing but remove effects and recreate them if you want to use special effects.

Whole trigger:

Code:
 Untitled Trigger 001
    Events
        Time - Every 0.03 seconds of game time
    Conditions
    Actions
        Set L = (Center of (Entire map))
        For each (Integer A) from 1 to NumberOfUnits, do (Actions)
            Loop - Actions
                Set X[(Integer A)] = (Position of units[(Integer A)])
                Set ChangingDistance = (Distance between L and X[(Integer A)])
                Set Angle = (Angle from L to X[(Integer A)])
                [B]Set Angle = (Angle + 3.00)[/B]
                Set ChangingDistance = (ChangingDistance + 3.00)
                [B]Set Destination = (L offset by ChangingDistance towards Angle degrees)[/B]                Custom script:   call RemoveLocation(udg_X[GetForLoopIndexA()])
                Set X[(Integer A)] = Destination
                Custom script:   call RemoveLocation(udg_ Destination)
                Unit - Move units[(Integer A)] instantly to X[(Integer A)]
                Custom script:   call RemoveLocation(udg_X[GetForLoopIndexA()])
        Custom script:   call RemoveLocation(udg_L)

Bolded lines are the heart of the trigger.

That’s for the basics. Let’s move on to the fun stuff.

Slightly Harder Stuff

Alright, so you should have by now a basic wisp wheel that follows around a point.

Let’s see what we might want to do with this power.

Let’s start off with something simple, changing speed.

New trigger - with certain periodic event (really depends) I will use every 3 seconds, but remeber just an example.

Globals? Just 1. Of type Real , no array (at the moment). I’m calling it ChangingAngle.

Now simply add this action.

Set ChangingAngle = (ChangingAngle + 2.00)

Change the + 2.00 to anything else you want. Now go to our moving trigger and change

Set Destination = (L offset by ChangingDistance towards Angle degrees)

To:

Set Destination = (L offset by ChangingDistance towards ChangingAngle degrees)

Now the we got a value that will keep changing.

Say we want to set different speed for each unit? Sure.

Add array to ChangingAngle with the size of NumberOfUnits.

Code:
For each (Integer A) from 1 to 6, do (Actions)
    Loop - Actions
        Set ChangingAngle[(Integer A)] = (ChangingAngle[(Integer A)] + (Real((Integer A))))

Change the + (Real((IntegerA))) to something else if you want

Now change this:

Set Destination = (L offset by ChangingDistance towards Angle degrees)

To:

Set Destination = (L offset by ChangingDistance towards ChangingAngle[Integer A] degrees)

Very easy. Want to change distance too? Same thing, create new real global with or without array and change at certain events it’s value. Then do:

Set Destination = (L offset by YourChangingDistance towards Angle degrees)

Instead of

Set Destination = (L offset by ChangingDistance towards Angle degrees)


Now here is the hardest part I’m going to talk about in this tutorial as I gave you the basics already and I want to keep this tutorial simple. It’s not hard, don’t worry, simply slightly harder them what we talked about already.

Let’s try to create a spiral.

How would we do it?

Easy!

We would create a wisp wheel (I’ll use one unit in this one) and simply do what we did before but we’ll keep changing the distance and angle.

So first let’s get our starting trigger, the trigger that will change distance and angle.

2 Globals variables of type real, I’m not going to use array because I use only one unit in this example, I’m calling one SAngle and this other SDistance.

Now let’s do a periodic event of every 0.03 seconds.

Set SAngle = (SAngle + 5)
Set SDistance = (SDistance + 1.8)

Just some random values I picked.

Keep in mind that if I did + 3 instead of + 5 when setting SAngle I would have gotten a whole circle in 3.6 seconds (rate of 1/360 angle points per 0.01. 0.01 * 360 ==3.6 seconds)

That being said 6 would be then 1.8 seconds. 9 would be 1.2 seconds. 12 would be .9 seconds. And so on.

As for distance I always think about footman range.

I don’t know why but I can remember more or less how long is the sword of the footman which is 90, so it helps me get perspective.

1.8 means will do every 30 seconds a whole sword of a footman, decent speed.

Now we need to make sure SAngle doesn’t get over 360, right? So get new real names FSAngle. And add to our trigger this action:

Set SFAngle = (SAngle mod 360.00)

This function is found under Real > Math > Modulo and it simply resets the real once it reaches 360 (360 = 0 361 = 1 etc.)

Now let’s on to the short, ridiculously easy trigger of the spiral.

New globals:

SL - point variable, just like L in the other wisp wheels.
SUnit - Like units in the other wisp wheels with but no array.
SDestination - like destination in the other wisp wheels point variable.

First let’s get SL as a point

Set SL = (Center of (Entire map))

Now let’s set SDestination compared to SL.

Set SDestination = (SL offset by SDistance towards SDistance degrees)

And finally let’s move unit towards SDestination
Unit - Move SUnit instantly to SDestination

And that’s it, you are done with spiral (expect leaks) all you needed was 2 simple triggers.

Any comments are welcomed.
 
I

IKilledKEnny

Guest
Thanks for the comment.

Good job on the system too!
 

PurgeandFire

zxcvmkgdfg
Reaction score
509
This is nice, I like how it explains a lot. Nll created one like this, but I don't know if it was this descriptive. I think both tuts are good, and nice job! :D Some in-game screenshots would be nice as well. :shades:
 
I

IKilledKEnny

Guest
Aye, nll's tutorial was the first tut (and only one? not sure :p) that I read about wisp wheels. But as I said I tryed to take a different angle with this.

As for screenshots I don't think they could tell much becuase the whole point of the wisp wheel is that the units keep moving around.
 
L

Lors

Guest
Great tutorial! I learned a lot from it!!

I always thought you need to move the unit but you simply reset thier location by changing the angle. Brilliant. :D
 
I

IKilledKEnny

Guest
Great tutorial! I learned a lot from it!!

I always thought you need to move the unit but you simply reset thier location by changing the angle. Brilliant. :D

Yes, this is the point of wisp wheels. ;)

Anyway any more feedback is well appreciated.
 
I

IKilledKEnny

Guest
I expected someone to ask it.

Simply I found that it simplifies things, I think I did note that X don't have to be an array.

You can ask as well why I use so many globals, and as I said at the begging of the tut, it simply makes the understanding process a lot easier.
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> I found that it simplifies things

There's the index to put, there's the "problem" of how to get Integer A in the custom script...
That's not "simpler". :p
 

n[u]ll

You can change this now in User CP.
Reaction score
93
Great job.. I'm really not one to explain as much as you did. I'd rather post a map with all the triggers. xD
 

Kazuga

Let the game begin...
Reaction score
110
Nice...

Real nice tutorial but I have sume suggestions, post some screenshots from point to point or atleast now and then that shows how it should look like. Otherwise it's easy to misunderstand what you mean (atleast to me...). An example on this is when you start making the wisp wheel, the "units" variable and the one after that. You have written "units equal to NumberOfUnits", do you here mean that you should take "units equal to (in your example case) 6? Or take "units equal to NumberOfUnits" wich is to me impossible since NumberOfUnits is an integer and units is a unit type... Please help me understand how you think because I would love to take part of your knowledge! :rolleyes:

Oh and one more thing, if you don't want to take your time explaining how to remove the leaks, please give a link to someone who can...

Greatest wishes Kazuga
 

Sil3nt

SUP?
Reaction score
134
Oh and one more thing, if you don't want to take your time explaining how to remove the leaks, please give a link to someone who can...

Not trying to be an ass or something but if you found your way to this tutorial you would be able to find the leak tutorial, or at least be able to search for it
 

Randor244

Active Member
Reaction score
34
Ok, for the first: why is this in the graveyard?

For the second: what is wisp wheels? I've worked in the WE for years but never heard of it.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top