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...
Next I will add this trigger...
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. ^^
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...
The first action adds 4 degrees to the variable (Point_VB)
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
(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.)
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..
And...
Then I add this trigger...
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...
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...
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...
will be changed to
and..
will change to...
Then we will set up a basic patrolling trigger for this unit...
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...*
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)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>)
Code:
Set Unit_VB = ((Position of <your unit>)
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)
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)
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)
If you have any questions PM me. Thanks for reading =)
*Map Containing These triggers is attatched...*