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
255
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: 264

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.

      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