Tutorial Wisp Wheels

n[u]ll

You can change this now in User CP.
Reaction score
93
Lately I've ran into a few people that were in the need of a wisp wheel. In turn I thought it would be a good idea to make a tutorial on them... Tyvm!
Comments are welcomed as long as they are constructive =)

A wisp wheel is basically commonly used in mazes and what it does is spins a number of wisps (or whatever unit you want) around a given region at a given speed. There may also be mods to the wisp wheel (show on the bottem) giving them more lines of wisps, change speeds periodicly, or change direction...

Difficulty - Easy
Variables Needed...
  • Point_VB (Real Variable, No Array)
  • Wisp_VB (Unit Array, Size = 1)

The Basics
First I'll start off with making a region... (Show Below)

Screen09.gif


Next I will add this trigger...

Code:
Make Wisps

    Events

        Time - Elapsed game time is 5.00 seconds

    Conditions

    Actions

        Set Reg_VB = ((Center of WispCircle Center Reg <gen>)

        Unit - Create 1 Wisp for Player 12 (Brown) at Reg_VB offset by 150.00 towards 0.00 degrees) facing Default building facing degrees

        Set Wisp_VB[1] = (Last created unit)

        Unit - Create 1 Wisp for Player 12 (Brown) at Reg_VB offset by 300.00 towards 0.00 degrees) facing Default building facing degrees

        Set Wisp_VB[2] = (Last created unit)

        Unit - Create 1 Wisp for Player 12 (Brown) at Reg_VB offset by 450.00 towards 0.00 degrees) facing Default building facing degrees

        Set Wisp_VB[3] = (Last created unit)

        Unit - Create 1 Wisp for Player 12 (Brown) at Reg_VB offset by 600.00 towards 0.00 degrees) facing Default building facing degrees

        Set Wisp_VB[4] = (Last created unit)

        Unit - Create 1 Wisp for Player 12 (Brown) at Reg_VB offset by 750.00 towards 0.00 degrees) facing Default building facing degrees

        Set Wisp_VB[5] = (Last created unit)

        Trigger - Turn on Move Wisps <gen>

This sets up the "Wisp_VB" variable and creates the wisps at their starting points, and lastly turns on the trigger used to move this wisps around in a circle. If you want you can repeat those actions but make them 180 degrees and set the wisp to 6-10, Making 2 lines of wisps. Even do it 3 more times making 4 lines of wisps circling around the region. ^^

Code:
Unit - Create 1 Wisp for Player 12 (Brown) at ((Reg_VB <gen>) offset by 150.00 towards 0.00 degrees) facing Default building facing degrees

What this does is basically Creates a wisp for player 12 a little bit off from the center of WispCircle Center Reg <gen>.

After that is finished you will need to add this trigger...

Code:
Move Wisps (Turned Off)

    Events

        Time - Every 0.06 seconds of game time

    Conditions

    Actions

        Set Point_VB = (Point_VB + 7.00)

        For each (Integer A) from 1 to 5, do (Actions)

            Loop - Actions

                Set Distance_VB[(Interger A)] = (Distance between (Position of Wisp_VB[(Integer A)] and (Center of Reg_Vb))

                Unit - Move Wisp_VB[(Integer A)] instantly to Reg_VB offset by Distance_VB[(Interger A)] towards Point_VB degrees)

The first action adds 4 degrees to the variable (Point_VB)

Code:
Unit - Move Wisp_VB[(Integer A)] instantly to Reg_VB offset by Distance_VB[(Interger A)] towards Point_VB degrees)

This may seem confusing but when broken down is simple. It basically moves each wisp that I specified in the first trigger (Wisp_VB 1-5) and moves them to the the same distance they were from the region only at a slightly different angle in the circle than before.

If you ever want to change the speed then change either the added interger in

Code:
Set Point_VB = (Point_VB + 7.00)

(Make the interger smaller to make it slower or higher to make it faster, do not make it too big or the wisps will appear to be skipping rather than circling.)

Or the periodic time for the event.

(Make the timer interger higher up to be a slower speed or lower to be faster. Making it too fast will make them appear to be skipping also.)

Going Further...

There is alot of things you will be able to create from those basic triggers but I can only explain so much. I will be adding more later on... (Sorry xD)

Making Wisps Slow Down/Speed Up Periodicly

This is something i like to do in my maps... It changes the speed periodicly of the wisps.

I will first do all of those triggers above and then add a trigger that is like the "Move Wisps" trigger only I will change the the two intergers for the event and the Set variable action to these..

Code:
    Events

        Time - Every 0.06 seconds of game time

And...

Code:
Set Point_VB = (Point_VB + 4.00)

Then I add this trigger...

Code:
Make Slower or Faster

    Events

        Time - Every 10.00 seconds of game time

    Conditions

    Actions

        Trigger - Turn off Move Wisps <gen>

        Trigger - Turn on Move Wisps Copy <gen>

        Wait 5.00 seconds

        Trigger - Turn off Move Wisps Copy <gen>

        Trigger - Turn on Move Wisps <gen>

What this will do is turn off the fast trigger and turn on the slower trigger for moving the wisps, then reverse that in 5 seconds. Causing it to loop and make the wisps speed up/slow down every 5 seconds.

Making Wisps Change Direction Periodicly

Now we can also add these triggers to make them change direction every 5 seconds...

Code:
Move Wisps Copy

    Events

        Time - Every 0.06 seconds of game time

    Conditions

    Actions

        Set Point_VB = (Point_VB - 7.00)

        For each (Integer A) from 1 to 5, do (Actions)

            Loop - Actions

                Set Distance_VB[(Interger A)] = (Distance between (Position of Wisp_VB[(Integer A)] and (Center of Reg_Vb))

                Unit - Move Wisp_VB[(Integer A)] instantly to Reg_VB offset by Distance_VB[(Interger A)] towards Point_VB degrees)

The only thing I have changed is instead of making Point_VB added by 4 I subtracted it by 4 causing the wisps to go the opposite direction.

Then to switch inbetween going counter clockwise/clockwise I will add the same trigger as before...

Code:
Change Direction

    Events

        Time - Every 10.00 seconds of game time

    Conditions

    Actions

        Trigger - Turn off Move Wisps <gen>

        Trigger - Turn on Move Wisps Copy <gen>

        Wait 5.00 seconds

        Trigger - Turn off Move Wisps Copy <gen>

        Trigger - Turn on Move Wisps <gen>

These two triggers are explained above...

Moving Wisp Wheel Around Patrolling Units

This is extremely fun in mazes and can be very challenging...
First we will establish the basics except for this slight variation...
Code:
Set Reg_VB = ((Center of WispCircle Center Reg <gen>)
will be changed to
Code:
Set Unit_VB = ((Position of <your unit>)
and..
Code:
Set Distance_VB[(Interger A)] = (Distance between (Position of Wisp_VB[(Integer A)] and (Center of Reg_Vb))

Unit - Move Wisp_VB[(Integer A)] instantly to Reg_VB offset by Distance_VB[(Interger A)] towards Point_VB degrees)
will change to...
Code:
Set Distance_VB[(Interger A)] = (Distance between (Position of Wisp_VB[(Integer A)] and (Position of <your unit>))

Unit - Move Wisp_VB[(Integer A)] instantly to Position of <your unit> offset by Distance_VB[(Interger A)] towards Point_VB degrees)
Then we will set up a basic patrolling trigger for this unit...
Code:
Patrols
    Events
        Time - Elapsed game time is 5.00 seconds
    Conditions
    Actions
        Unit - Create 1 Footman for Player 12 (Brown) at (Center of <your region> <gen>) facing Default building facing degrees
        Set unit_vb = (Last created unit)
        Set region_vb = <your region> <gen>
        Unit - Order unit_vb to Patrol To (Center of region_vb)
This will make a footman owned by player 12 brown and then make it patrol to a specified region...

If you have any questions PM me. Thanks for reading =)

*Map Containing These triggers is attatched...*
 

Tonks

New Member
Reaction score
160
>The Frozen Throne Needed

No, it's really not.. Everything here can be accomplished without it.

It's a little to short. You should explain what your triggers do, why you used the actions you did, etc.
 

n[u]ll

You can change this now in User CP.
Reaction score
93
>The Frozen Throne Needed
Woops, Used is more of the word I was looking for (Thx for pointing that out)

>No, it's really not.. Everything here can be accomplished without it.

It's a little to short. You should explain what your triggers do, why you used the actions you did, etc.

I'll take that into consideration, also I'm adding more things to do with the main triggers later on o_O
 

PurgeandFire

zxcvmkgdfg
Reaction score
509
Great job. I also second the opinion that you should add a little more info.

EDIT: I was about to ask why it slows down, but I forgot to read the bottom. :p

+rep

________________________________

HEAD BANGER!!! :banghead: :banghead:
 

n[u]ll

You can change this now in User CP.
Reaction score
93
o_O mk ima follow what u say. after all you've been mapping wc3 since the beta days LoL.
*off topic*
What was it like way back then? Im pretty new to wc3...
 

Tonks

New Member
Reaction score
160
o_O mk ima follow what u say. after all you've been mapping wc3 since the beta days LoL.
*off topic*
What was it like way back then? Im pretty new to wc3...

To expand on what I suggested earlier:

Code:
Make Wisps
    Events
        Time - Elapsed game time is 5.00 seconds
    Conditions
    Actions
        Unit - Create 1 Wisp for Player 12 (Brown) at ((Center of WispCircle Center Reg <gen>) offset by 150.00 towards 0.00 degrees) facing Default building facing degrees
        Set Wisp_VB[1] = (Last created unit)

Time - Elapsed game time is 5.00 seconds
- This is best because running a trigger on Map Initialization can sometimes cause problems.

Unit - Create 1 Wisp...
- Creates one Wisp to become part of the Wisp Wheel. Offset can be adjusted to the point of your liking.

Set Wisp_VB[1] = (Last created unit)
- Sets the unit variable (Wisp_VB, Array #1) to the wisp you just created.

You should take a look at AceHart's save / load code tutorial for a good example of the trigger explanations.


Continuing off-topic:
It was a lot different. There were no organized clans with tags, mostly people just remade accounts to join clans. The WE was terrible compared to what it is today. It was more fun, though, in my opinion, because there were less kids, more mature people, and only like 4 custom games.
 

waaaks!

Zinctified
Reaction score
256
what does this tutorail do?
and what is wisp wheel?
can u post a screen shot that showing the wisp wheel is finished?
 

Tonks

New Member
Reaction score
160
what does this tutorail do?
and what is wisp wheel?
can u post a screen shot that showing the wisp wheel is finished?

Hmm.. Good point. You should explain what exactly a Wisp Wheel is, what it's used for, and provide some screenshots. An animation may even be in order.
 

Andrewgosu

The Silent Pandaren Helper
Reaction score
716
Does this produce "lagg" if I use these triggers in a map of mine? Someone somewhere said that points leak.
 
I

IKilledKEnny

Guest
Overall this is certainly a good tutorial, +REP. However you should add (I repeat few of the stuff that have been said).

Pictures / Short.
Explain triggers better, I presume this is aimed for the newer WE mappers and without explaination it would be difficult for them to understand it.
Fix: Wisp_VB (Unit Array, Size = 1)
Fix: Add leaks cleaning, your triggers leak pretty badly.
There are more efficent way to make whisps go faster or slower.
 

n[u]ll

You can change this now in User CP.
Reaction score
93
Does this produce "lagg" if I use these triggers in a map of mine? Someone somewhere said that points leak.

well, I can tell you this much... I had tested the map containing all this stuff multiple times and it seems to me like theres no lag, I had left it there going for about 25 mins, when I got back still no lag =/ but i didnt test it on bnet so idk...
by what i have seen, if theres lag there is very little and unoticable lag... thought, i could be wrong.
if i am wrong the my apolohies xD
 

Tonks

New Member
Reaction score
160
well, I can tell you this much... I had tested the map containing all this stuff multiple times and it seems to me like theres no lag, I had left it there going for about 25 mins, when I got back still no lag =/ but i didnt test it on bnet so idk...
by what i have seen, if theres lag there is very little and unoticable lag... thought, i could be wrong.
if i am wrong the my apolohies xD

Yes, there are leaks. Try running these through LeakChecker and fix it. It's a bad idea to had a tutorial with leaks, as it will encourage the idea that periodic event leaks don't matter.
 

n[u]ll

You can change this now in User CP.
Reaction score
93
Bump
>Bump
>>Bump
>>>Bump
>>>>Bump
>>>>>Bump
>>>>>>Bump
>>>>>>>Bump
>>>>>>Bump
>>>>>Bump
>>>>Bump
>>>Bump
>>Bump
>Bump
Bump
 
A

Archangl

Guest
?

im doing somthing wrong but i dont know what the wheel spins but when i try adding more wisps but a different degree all it does is bunch the wisp together and they al spin on the same line. any ideas on what im doing wrong? if u can look at my map and tell me where i went wrong id appreciate it
 

Attachments

  • My Wheel.w3x
    13 KB · Views: 269

n[u]ll

You can change this now in User CP.
Reaction score
93
im doing somthing wrong but i dont know what the wheel spins but when i try adding more wisps but a different degree all it does is bunch the wisp together and they al spin on the same line. any ideas on what im doing wrong? if u can look at my map and tell me where i went wrong id appreciate it

You'll hafta make another variable like the real variable only set it originally to 180.00. then make another action similar to
Code:
Set <variable name> = <variable name> + 1
then have the wisps you are trying to make be offset by whatever towards <variable talked about above>
then ther you go ^^
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • 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!
  • 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

      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