Ryuu
I am back with Chocolate (:
- Reaction score
- 64
SlideGUI Version 07
Features:
Requirements: World Editor, a dummy unit, at least a quarter brain
Coding: Purely GUI! (other than custom scripts)
MUI/MPI: MUI, yes, but how do I tell if it is MPI?
Additional Features:
Pros and Cons
Activating the System
To make a unit slide to a point, you don't need to copy the entire system and modify everything. All you need to do is just implement the system into your map, and then from anywhere, do this:
If you are still unsure, download the map and copy the actions in trigger 'Example Call Function' into your map.
Speed Conversion
A good sliding speed is 20. To convert it into Warcraft's unit, first identify the range per second.
20 range/0.03 seconds <-- Default
(20 range * 33.3333333)/1 second
666.666666 range/1 second
So which means you basically go 666.666666 range per every second while sliding.
This is faster than Warcraft's 522 max speed.
If you want to slide at Warcraft's max speed, you need to do conversion.
666.666666 Warcraft speed --> 20 SlideGUI speed
522 Warcraft speed --> (20 / 666.666666) * 522 SlideGUI speed
522 Warcraft speed --> 15.66 SlideGUI speed
So if you want your unit to slide at the max Warcraft speed, just set the variable SlideGUI_Speed to 15.66.
All in all, the formula for converting from SlideGUI speed into Warcraft speed is:
(SlideGUI speed / (SlideGUI speed * 33.3333333) * 522)
Please do not input these values in the system. Calculate the values, then input the result in the system.
Documentation
The triggers
Changelog
Download SlideGUI 07 here:
Version 07 is out! Just some removing, really.
SlideGUI System 07
Updated at 23:00 (GMT+8) on Sunday December 14
A system by PureGUI
Updated at 23:00 (GMT+8) on Sunday December 14
A system by PureGUI
Features:
Requirements: World Editor, a dummy unit, at least a quarter brain
Coding: Purely GUI! (other than custom scripts)
MUI/MPI: MUI, yes, but how do I tell if it is MPI?
Additional Features:
- Developed to be easily modified (using the activate feature) so that you can change it into another system like Knockback, Speed Control and what else.
- Able to control lag (as of version 02)
- 'Call' function (just set four variables to activate system)
Pros and Cons
pros
- easy implementation, no hassle
- easily modified into another system in need of using slide
- fully customizable, from speed of slide to angle of slide
- JASS users-friendly, because GUI is known to all mapmakers
- multiple unit instanceable (MUI)
- don't need to copy the entire system with every usage, just implement it into your map and set the variables.
cons
- require a dummy unit
Activating the System
To make a unit slide to a point, you don't need to copy the entire system and modify everything. All you need to do is just implement the system into your map, and then from anywhere, do this:
Trigger:
- Example Call Function
- Events
- Your Events Here
- Conditions
- Actions
- Set SlideGUI_AffectedUnit[(SlideGUI_CustomValue + 1)] = The unit that is going to slide
- Set SlideGUI_AffectedUnitPosition[(SlideGUI_CustomValue + 1)] = Position of the unit that is going to slide
- Set SlideGUI_SpecifiedPoint[(SlideGUI_CustomValue + 1)] = The point where unit stops sliding
- Set SlideGUI_Speed[(SlideGUI_CustomValue + 1)] = Speed of the unit sliding
- Events
If you are still unsure, download the map and copy the actions in trigger 'Example Call Function' into your map.
Speed Conversion
A good sliding speed is 20. To convert it into Warcraft's unit, first identify the range per second.
20 range/0.03 seconds <-- Default
(20 range * 33.3333333)/1 second
666.666666 range/1 second
So which means you basically go 666.666666 range per every second while sliding.
This is faster than Warcraft's 522 max speed.
If you want to slide at Warcraft's max speed, you need to do conversion.
666.666666 Warcraft speed --> 20 SlideGUI speed
522 Warcraft speed --> (20 / 666.666666) * 522 SlideGUI speed
522 Warcraft speed --> 15.66 SlideGUI speed
So if you want your unit to slide at the max Warcraft speed, just set the variable SlideGUI_Speed to 15.66.
All in all, the formula for converting from SlideGUI speed into Warcraft speed is:
(SlideGUI speed / (SlideGUI speed * 33.3333333) * 522)
Please do not input these values in the system. Calculate the values, then input the result in the system.
Documentation
JASS:
//*******************************************************************************************************
//
// Part of the
// ______ __ __ ______ ______ ______ __ __ __
// /\ == \ /\ \/\ \ /\ == \ /\ ___\ /\ ___\ /\ \/\ \ /\ \
// \ \ _-/ \ \ \_\ \ \ \ __< \ \ __\ \ \ \__ \ \ \ \_\ \ \ \ \
// \ \_\ \ \_____\ \ \_\ \_\ \ \_____\ \ \_____\ \ \_____\ \ \_\
// \/_/ \/_____/ \/_/ /_/ \/_____/ \/_____/ \/_____/ \/_/
//
// project
//
//*******************************************************************************************************
//*******************************************************************************************************
// SlideGUI System 07b
//*******************************************************************************************************
//
// Developer:
// * Ryuu
//
// Intention:
// * As the first movement of the PureGUI project, its my first step working towards my goal
// * for making life easier for beginners to World Editor. I intend to achieve this simply by
// * making heavier coded systems in purely GUI, as a fully customizable and easily modified
// * system. You've downloaded it - my very first system ever made!
//
// Requirements:
// * Dummy unit with:
// - ability "Locust"
// - no model
// - no shadow
// - no attack
// - no movement
//
// Features:
// * easy implementation, no hassle
// * easily modified into another system in need of using slide
// * fully customizable, from speed of slide to angle of slide
// * JASS users-friendly, because GUI is known to all mapmakers
// * multiple unit instanceable (MUI)
// * don't need to copy the entire system with every usage, just implement it into your map
// and set the variables.
//
// Implementation Exercise:
// * Copy the dummy unit from the Object Editor into your map, or create one yourself by
// following the above details "under 'Requirements'".
// * Copy the entire folder 'SlideGUI' into your map.
//
// Activation Exercise:
// * Set SlideGUI_AffectedUnit[(SlideGUI_CustomValue + 1)] = The unit that is going to slide
// * Set SlideGUI_AffectedUnitPosition[(SlideGUI_CustomValue + 1)] = Position of the unit
// that is going to slide
// * Set SlideGUI_SpecifiedPoint[(SlideGUI_CustomValue + 1)] = The point where unit stops
// sliding
// * Set SlideGUI_Speed[(SlideGUI_CustomValue + 1)] = Speed of the unit sliding
//
// SFX Addition Exercise:
// * Before-Effect
// - This happens before unit slide. The effect happens once before unit slides.
// At your 'Activating the System' trigger, after setting the variables, add in your
// special effect and destroy it.
//
// * During-Effect
// - This happens when unit slide. The effect happens every 0.03 seconds while unit is
// sliding. At SlideGUI Slide trigger, look for the comment text that says 'IT IS HERE
// THAT YOU CHANGE YOUR DURING-EFFECT!' and at the action below that, change it into
// the special effect that you want.
//
// * Collision Effect
// - This happens when the sliding unit collides with another unit while sliding. This
// effect only happens once. At SlideGUI Slide trigger, look for the comment text that
// says 'IT IS HERE THAT YOU CHANGE YOUR UNIT COLLISION EFFECT!' and at the action
// below that, change it into the special effect that you want.
//
// * Post-Effect
// - This happens when unit finished sliding. The effect happens only once.
// At SlideGUI Slide trigger, look for the comment text that says 'IT IS HERE THAT YOU
// CHANGE YOUR POST-EFFECT!' and at the action below that, change it into the special
// effect that you want.
//
//*******************************************************************************************************
// <a href="http://www.thehelper.net/forums/showthread.php?t=112829" class="link link--internal">http://www.thehelper.net/forums/showthread.php?t=112829</a>
// This is where you downloaded SlideGUI from. Be sure to comment on it and give feedback! <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite8" alt=":D" title="Big Grin :D" loading="lazy" data-shortname=":D" />
//
// P.S. This documentation was written 'JASS' form because I love it. It has no particular meaning; its
// just like this for fun.
//
// P.S.2 No this is not a playstation two, so don't bother being so happy. You don't need to give me
// credits. I don't ask for it, and I'm a very generous person, so I don't want it.
//*******************************************************************************************************
The triggers
SlideGUI Initialization trigger
SlideGUI Slide trigger (comments taken off)
Code:
SlideGUI Initialization
Events
Time - Every 0.03 seconds of game time
Conditions
SlideGUI_AffectedUnit[(SlideGUI_CustomValue + 1)] Not equal to No unit
Actions
Set SlideGUI_CustomValue = (SlideGUI_CustomValue + 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SlideGUI_CustomValue Greater than or equal to 1000
Then - Actions
Set SlideGUI_CustomValue = 1
Else - Actions
Set SlideGUI_MaxRange[SlideGUI_CustomValue] = (Distance between SlideGUI_AffectedUnitPosition[SlideGUI_CustomValue] and SlideGUI_SpecifiedPoint[SlideGUI_CustomValue])
Set SlideGUI_CenterMap = (Center of (Playable map area))
Set SlideGUI_Angle[SlideGUI_CustomValue] = (Angle from SlideGUI_AffectedUnitPosition[SlideGUI_CustomValue] to SlideGUI_SpecifiedPoint[SlideGUI_CustomValue])
Unit - Create 1 SlideGUI Dummy for Neutral Passive at SlideGUI_CenterMap facing Default building facing degrees
Unit - Set the custom value of (Last created unit) to SlideGUI_CustomValue
Unit Group - Add (Last created unit) to SlideGUI_DummyGroup
Custom script: call RemoveLocation( udg_SlideGUI_CenterMap )
SlideGUI Slide trigger (comments taken off)
Code:
SlideGUI Slide
Events
Time - Every 0.03 seconds of game time
Conditions
SlideGUI_CustomValue Greater than 0
Actions
Custom script: set bj_wantDestroyGroup = true
Unit Group - Pick every unit in SlideGUI_DummyGroup and do (Actions)
Loop - Actions
Set SlideGUI_MUISetting = (Custom value of (Picked unit))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(SlideGUI_AffectedUnit[SlideGUI_MUISetting] is dead) Equal to True
Then - Actions
Unit - Remove (Picked unit) from the game
Else - Actions
Set SlideGUI_AffectedUnitPosition2[SlideGUI_MUISetting] = (Position of SlideGUI_AffectedUnit[SlideGUI_MUISetting])
Set SlideGUI_AffectedUnitOffset[SlideGUI_MUISetting] = (SlideGUI_AffectedUnitPosition2[SlideGUI_MUISetting] offset by SlideGUI_Speed[SlideGUI_MUISetting] towards SlideGUI_Angle[SlideGUI_MUISetting] degrees)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SlideGUI_MovedRange[SlideGUI_MUISetting] Less than SlideGUI_MaxRange[SlideGUI_MUISetting]
Then - Actions
Set SlideGUI_MovedRange[SlideGUI_MUISetting] = (SlideGUI_MovedRange[SlideGUI_MUISetting] + SlideGUI_Speed[SlideGUI_MUISetting])
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in (Units within 50.00 of SlideGUI_AffectedUnitOffset[SlideGUI_MUISetting])) Equal to 1
Then - Actions
Unit - Move SlideGUI_AffectedUnit[SlideGUI_MUISetting] instantly to SlideGUI_AffectedUnitOffset[SlideGUI_MUISetting]
Else - Actions
Unit - Order SlideGUI_AffectedUnit[SlideGUI_MUISetting] to Stop
Set SlideGUI_AffectedUnitPosition[SlideGUI_MUISetting] = (Position of SlideGUI_AffectedUnit[SlideGUI_MUISetting])
Special Effect - Create a special effect at SlideGUI_AffectedUnitPosition[SlideGUI_MUISetting] using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
Special Effect - Destroy (Last created special effect)
Custom script: call RemoveLocation( udg_SlideGUI_AffectedUnitPosition[udg_SlideGUI_MUISetting] )
Set SlideGUI_AffectedUnit[SlideGUI_MUISetting] = No unit
Unit - Remove (Picked unit) from the game
Set SlideGUI_AffectedUnitPosition[SlideGUI_MUISetting] = (Position of SlideGUI_AffectedUnit[SlideGUI_MUISetting])
Destructible - Pick every destructible within 100.00 of SlideGUI_AffectedUnitPosition[SlideGUI_MUISetting] and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Destructible-type of (Picked destructible)) Equal to Ashenvale Tree Wall
(Destructible-type of (Picked destructible)) Equal to Ashenvale Canopy Tree
(Destructible-type of (Picked destructible)) Equal to Barrens Tree Wall
(Destructible-type of (Picked destructible)) Equal to Barrens Canopy Tree
(Destructible-type of (Picked destructible)) Equal to Black Citadel Tree Wall
(Destructible-type of (Picked destructible)) Equal to Cityscape Fall Tree Wall
(Destructible-type of (Picked destructible)) Equal to Cityscape Ruined Tree Wall
(Destructible-type of (Picked destructible)) Equal to Cityscape Snowy Tree Wall
(Destructible-type of (Picked destructible)) Equal to Cityscape Summer Tree Wall
(Destructible-type of (Picked destructible)) Equal to Cityscape Winter Tree Wall
(Destructible-type of (Picked destructible)) Equal to Dalaran Ruins Tree Wall
(Destructible-type of (Picked destructible)) Equal to Dungeon Tree Wall
(Destructible-type of (Picked destructible)) Equal to Felwood Tree Wall
(Destructible-type of (Picked destructible)) Equal to Felwood Canopy Tree
(Destructible-type of (Picked destructible)) Equal to Icecrown Tree Wall
(Destructible-type of (Picked destructible)) Equal to Icecrown Canopy Tree
(Destructible-type of (Picked destructible)) Equal to Northrend Canopy Tree
(Destructible-type of (Picked destructible)) Equal to Fall Tree Wall
(Destructible-type of (Picked destructible)) Equal to Summer Tree Wall
(Destructible-type of (Picked destructible)) Equal to Snowy Tree Wall
(Destructible-type of (Picked destructible)) Equal to Winter Tree Wall
(Destructible-type of (Picked destructible)) Equal to Northrend Tree Wall
(Destructible-type of (Picked destructible)) Equal to Outland Tree Wall
(Destructible-type of (Picked destructible)) Equal to Ruins Tree Wall
(Destructible-type of (Picked destructible)) Equal to Ruins Canopy Tree
(Destructible-type of (Picked destructible)) Equal to Underground Tree Wall
(Destructible-type of (Picked destructible)) Equal to Village Tree Wall
(Destructible-type of (Picked destructible)) Equal to Village Tree Wall
Then - Actions
Destructible - Kill (Picked destructible)
Else - Actions
Special Effect - Create a special effect at SlideGUI_AffectedUnitPosition[SlideGUI_MUISetting] using Doodads\Cinematic\TownBurningFireEmitterBlue\TownBurningFireEmitterBlue.mdl
Special Effect - Destroy (Last created special effect)
Custom script: call RemoveLocation( udg_SlideGUI_AffectedUnitPosition[udg_SlideGUI_MUISetting] )
Else - Actions
Unit - Order SlideGUI_AffectedUnit[SlideGUI_MUISetting] to Stop
Set SlideGUI_AffectedUnitPosition[SlideGUI_MUISetting] = (Position of SlideGUI_AffectedUnit[SlideGUI_MUISetting])
Special Effect - Create a special effect at SlideGUI_AffectedUnitPosition[SlideGUI_MUISetting] using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
Special Effect - Destroy (Last created special effect)
Custom script: call RemoveLocation( udg_SlideGUI_AffectedUnitPosition[udg_SlideGUI_MUISetting] )
Set SlideGUI_AffectedUnit[SlideGUI_MUISetting] = No unit
Unit - Remove (Picked unit) from the game
Custom script: call RemoveLocation( udg_SlideGUI_AffectedUnitPosition[udg_SlideGUI_MUISetting] )
Custom script: call RemoveLocation( udg_SlideGUI_AffectedUnitPosition2[udg_SlideGUI_MUISetting] )
Custom script: call RemoveLocation( udg_SlideGUI_AffectedUnitOffset[udg_SlideGUI_MUISetting] )
Custom script: call RemoveLocation( udg_SlideGUI_SpecifiedPoint[udg_SlideGUI_MUISetting] )
Changelog
Code:
07
- 'face unit' removed - if you want to make a unit face wherever while sliding, just make it.
06b
- fixed a bug that caused the system to not work.
06
- optiimzed code and fixed code a little.
- destructible collision is now tree collision.
05
- realised the system was missing a 'remove group' custom script. Added it in.
- destructible collision now added (all destructibles will now be destroyed when sliding)
- unit collision also added (clash of sliding unit and other units will stop sliding unit)
- unit collision special effect now editable (see below)
- when activating system, need not input angle. (that makes it one variable easier! :D)
04b
- although activating the system is three variables harder, modification is much simpler
04
- thanks to Flare, the MUI function is changed - now use a dummy unit!
- you can now 'call' the system from anywhere - read the last paragraph in Implementation Instructions!
- triggers are reduced from 5 to 2, variables increased from 12 to 14.
- you can now add special effects (this addition is really just for beginners..), to add, look below.
03
- SlideGUI can now 'slide' through the 8191 limit - you can slide for as long as you like now!
- thanks to "U are a noob" for his suggestion.
02
- added a new variable to prevent : lag when too many units slide for a period of time
01
- initial release
Download SlideGUI 07 here: