System SlideGUI

Flare

Stops copies me!
Reaction score
662
Hehe, cool, GUI MUI sliding :D Shame that it's so prone to lag (going by cleeezzz's experience with it :p)
- nice work for actually taking the time to do it though (too lazy to read through code at the moment)

Using Flare's MUI sollution with dummy units in a group with custom values as arrays would probably be a whole lot better.
<3
 

Ryuu

I am back with Chocolate (:
Reaction score
64
Well truth is not that I don't want to use your solution.
It's just that.. I'm too lazy to read :(

EDIT:
But I will. Tomorrow, I guess. :D
 

Ryuu

I am back with Chocolate (:
Reaction score
64
Version 04 will come out tomorrow, expect an array of updates.
 

Romek

Super Moderator
Reaction score
963
Hey, guess what. Think slide can only be in JASS? I've beaten you. Here is...
It can easily be made in both Jass and GUI.
Although whether you believe it or not, Jass is more efficient and easier to implement.

Also, using the new [noparse]
Trigger:
[/noparse] tags would be cool.
Although the font size is really bulky. :p
 

Ryuu

I am back with Chocolate (:
Reaction score
64
> Also, using the new
Trigger:
tags would be cool.


I tried using it, but apparently some actions took two lines..

EDIT:
Version 04 is out! Click here to download!

UPDATES:
- thanks to Flare, the MUI function is changed - now use a dummy unit!
- there is now a 'call' function to save the hassle of copying the system and modify it for every usage - just 'call' it directly from anywhere!
- 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)!

EDIT2:
The above version is outdated. Click here to download the latest version.
 

Ryuu

I am back with Chocolate (:
Reaction score
64
EDIT:
Version 04b is out! Click here to download!

UPDATES:
- although activating the system is three variables harder, modification is much simpler

EDIT2:
The above version is outdated. Click here to download the latest version.
 
Reaction score
341
There's nothing special about this. It's a slide system/snippet. There are actually better versions in JASS. Your not going to get much comments , it's just a sliding system.

Anyways +rep.
 

Flare

Stops copies me!
Reaction score
662
Hmmm...
Code:
Set SlideGUI_SpecifiedPoint[(SlideGUI_CustomValue + 1)] = The point where unit stops sliding
Set SlideGUI_Angle[(SlideGUI_CustomValue + 1)] = Angle that unit will slide towards
Seems a bit useless to have both an angle, and an end-location parameter (I assume SpecifiedPoint is a point variable), since how am I going to reach a point that is at 45 degrees with respect to my unit, if a specify a 135 degree sliding angle? :p A total distance, or a speed decrement value, would be far more effective (if you want to maintain something simple and easy-to-use, I'd go with total distance since there's no math requires to get things to go the right distance)

There's nothing special about this. It's a slide system/snippet. There are actually better versions in JASS. Your not going to get much comments , it's just a sliding system.
1) It's in GUI, every other slide system is in JASS, that's something that'd make it special (whether that makes it better/worse is for the end-user to decide) - some people are dead-set against using JASS systems (for some reason), and this works, it's relatively easy to use (a Run Trigger mechanism would've been nice, since you could just set your variables, and run that trigger that initiates the slide) which, for a GUI system, is a nice achievement (since, generally, GUI system usability is quite sucky, unless the system is fully automated without any user input)

2) Not many comments? It's already got about 25 (which is a decent number of comments for a resource)

3) Could the same not be said for most (not all, I know that emjlr3's has friction and stuff like that, so it has a fairly different mechanism of working, not sure about others) sliding systems?
 

Ryuu

I am back with Chocolate (:
Reaction score
64
> Seems a bit useless to have both an angle, and an end-location parameter (I assume SpecifiedPoint is a point variable), since how am I going to reach a point that is at 45 degrees with respect to my unit, if a specify a 135 degree sliding angle?

Yeah, true. So I should take away 'SlideGUI_Angle'.

> It's in GUI, every other slide system is in JASS, that's something that'd make it special

I agree with you! :D

> whether that makes it better/worse is for the end-user to decide

True..

> it's relatively easy to use

Yup!!

> a Run Trigger mechanism would've been nice, since you could just set your variables, and run that trigger that initiates the slide

I made it even easier, just set variables, not need to run trigger.

> Not many comments? It's already got about 25 (which is a decent number of comments for a resource)

Unfortunately it's still not yet approved :(

> Could the same not be said for most (not all, I know that emjlr3's has friction and stuff like that, so it has a fairly different mechanism of working, not sure about others) sliding systems?

Actually, the mechanism behind this system is ultimately simple. The main action is just 'Unit - Move Unit Instantly to Point', no math included.

> Hasn't got many comments? It's got about 25 so far (and, generally, alot of the resources wouldn't get that many without arguments

You repeated number 2 twice.
 

Ryuu

I am back with Chocolate (:
Reaction score
64
Version 05 is out! Click here to download!

UPDATES:
- 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
- when activating system, need not input angle. (that makes it one variable easier! :D)

EDIT2:
The above version is outdated. Click here to download the latest version.
 

Larcenist

REP: Respect, Envy, Prosperity?
Reaction score
211
Code:
                                Destructible - Pick every destructible within 100.00 of SlideGUI_AffectedUnitPosition[SlideGUI_MUISetting] and do (Actions)
                                    Loop - Actions
                                        Destructible - Kill (Picked destructible)

That's quite lame since it'll kill any destructable, not only trees (pathing blockers being one of the things).

Too tired to read through all that code though to find anything else (GUI hurts my eyes).
 

Flare

Stops copies me!
Reaction score
662
Code:
                        Set SlideGUI_AffectedUnitPosition2[B][SlideGUI_MUISetting][/B] = (Position of SlideGUI_AffectedUnit[SlideGUI_MUISetting])
                        Set SlideGUI_AffectedUnitOffset[B][SlideGUI_MUISetting][/B] = (SlideGUI_AffectedUnitPosition2[SlideGUI_MUISetting] offset by SlideGUI_Speed[SlideGUI_MUISetting] towards SlideGUI_Angle[SlideGUI_MUISetting] degrees)
Those two points don't need to be arrayed (assuming I'm right in saying that they are ONLY used for moving the unit). If that's the case, they would be temporary variables (i.e. created, used immediately without any waits, destroyed), so you can make them non-arrayed, and it shouldn't affect the system's MUI capabilities. You don't have to change it, I personally don't think it has any impact in any way whatever way you do it, but it's always nice to know something that makes your triggering that little bit simpler

Code:
        Custom script:   set bj_wantDestroyGroup = true
No - no, no, no, no, no. You really don't want to destroy that group
1) The group isn't leaking (adding and removing units with Group - Add/Remove Unit don't cause leaks)
2) If you destroy the group, you have no way of refering to your sliding units en masse (or, in this case, at all)

Code:
                        Unit - Set the custom value of (Last created unit) to SlideGUI_CustomValue
                        Unit Group - Add (Last created unit) to SlideGUI_DummyGroup
Ahm... what? Why is that in your periodic trigger? You're not creating any unit before that point, so why is it there? This could also create problems, if you create a unit not meant for the system (i.e. if a person created a dummy caster), the system would register it as Last Created Unit, give it a custom value of SlideGUI_CustomValue (i.e. the current top index), and give you 2 references to the one slide with the Pick Every Unit... so a unit may slide twice as fast as it's supposed to
 

Ryuu

I am back with Chocolate (:
Reaction score
64
I'm now using the PSP web browser. Will fix those stuff that you guys said.
 

Tukki

is Skeleton Pirate.
Reaction score
29
Well, although it's pretty good code-wise, you should consider using an effect with a "stand" animation - rather than spamming loads of them, creating a heckload of handles and initializing them all..

Furthermore, some code comments:

Code:
(Number of units in SlideGUI_DummyGroup) Greater than 0
This, is not a good way of checking. You should use a global integer instead, it will spare you that ForGroup call.

Code:
Unit - Remove (Picked unit) from the game
Use Hide+Kill instead! This is a must, really. As RemoveUnit() fucks up unit attachments.

Code:
Set SlideGUI_Speed[(SlideGUI_CustomValue + 1)] = Speed of the unit sliding
Make this use normal speed values like 900, instead of 15.

Also, point out that this system uses UnitCustomData. Flare took the most things I believe. Larcenist pointed out a critical bug, I've not experimented with Pathing Blockers -- but if they get erased, this must be fixed as well.

EDIT: Your collision detection method is flawed, as it counts the "slider" as well. Just make it be "==1" instead.
 

Ryuu

I am back with Chocolate (:
Reaction score
64
Version 06 is out! Click here to download!

UPDATES:
- optiimzed code and fixed code a little.
- destructible collision is now tree collision.

EDIT2:
The above version is outdated. Click here to download the latest version.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top