Help with gui spell to gui mui spell

millzy

Ultra Cool Member
Reaction score
44
ok i think iv got this part right
Code:
Slide Init
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Slide GUI 
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Spell_no Less than 1000
            Then - Actions
                Set Spell_no = (Spell_no + 1)
            Else - Actions
                Set Spell_no = 1
        Set Caster[Spell_no] = (Casting unit)
        Set CasterPosition[Spell_no] = (Position of Caster[Spell_no])
        Set TargetPoint[Spell_no] = (Target point of ability being cast)
        Set Angle[Spell_no] = (Angle from CasterPosition[Spell_no] to TargetPoint[Spell_no])
        Set N[Spell_no] = 0.00
        Unit - Turn collision for Caster[Spell_no] Off


this is the problem

Code:
Slide Effect
    Events
        Time - Every 0.03 seconds of game time
    Conditions
    Actions
        Set CasterPosition[Spell_no] = (Position of Caster[Spell_no])
        Set MoveToPoint[Spell_no] = (CasterPosition[Spell_no] offset by 25.00 towards Angle[Spell_no] degrees)
        Set N[Spell_no] = 25.00
        Unit - Move Caster[Spell_no] instantly to MoveToPoint[Spell_no]
        Special Effect - Create a special effect at CasterPosition[Spell_no] using Abilities\Spells\Other\Stampede\StampedeMissile.mdl
        Special Effect - Destroy (Last created special effect)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                N[Spell_no] Greater than or equal to Distance[Spell_no]
            Then - Actions
                Set spellon[Spell_no] = False
                Unit - Turn collision for Caster[Spell_no] On
            Else - Actions

i dunno what to add to the conditions for turn of and turn on for the spell..... it works you slide but u dont stop

i need a condition that turns it on and off

i also need to remove the leaks


P.S i dont evan no if this is MUI YET

EDIT:any 1 out there can help???
 

Grurf

Ultra Cool Member
Reaction score
30
Ok, I'll try to help.

  1. First of all, as far as I can see the ability isn't MUI yet, as the trigger Slide Effect only moves the most recent caster. If you want to make it MUI in this way, you will have to check all thousand possible casters and move them if applicable.
  2. When it comes to the condition: you now set N to 25 every time you move the caster, so it will never become bigger than 25. You probably wanted to set N to N + 25, right? If Distance is greater than 25, the condition will at the moment always be false.
  3. Speaking of which: where do you set Distance? I can't find it in the triggers you posted.

Some things you might consider:
  • I think 1000 is an outrageously high amount of simultaneous casters. Depending on how many players the map supports, how many units have the ability, the ability's cooldown and how long it lasts, you will probably want to reduce it to 50, or maybe even 30.
  • When it comes to MUI, it will always remain awkward when triggering in GUI. To my best knowledge, MUI can be made with much more ease and style using JASS (people: feel free to disagree, my knowledge isn't all-embracing ;)). Though I can understand if you think that's too hard to learn.
  • You might want to use SetUnitX and SetUnitY instead of Move Unit instantly, because these two functions are said to be faster (they don't interrupt orders or bother with pathing). They can be accessed using Custom script, like this:
    Code:
    call SetUnitX( udg_Caster[udg_Spell_no], GetLocationX( udg_MoveToPoint[udg_Spell_no] ) )
    call SetUnitY( udg_Caster[udg_Spell_no], GetLocationY( udg_MoveToPoint[udg_Spell_no] ) )
 

millzy

Ultra Cool Member
Reaction score
44
Ok, I'll try to help.

  1. First of all, as far as I can see the ability isn't MUI yet, as the trigger Slide Effect only moves the most recent caster. If you want to make it MUI in this way, you will have to check all thousand possible casters and move them if applicable.
  2. When it comes to the condition: you now set N to 25 every time you move the caster, so it will never become bigger than 25. You probably wanted to set N to N + 25, right? If Distance is greater than 25, the condition will at the moment always be false.
  3. Speaking of which: where do you set Distance? I can't find it in the triggers you posted.

Some things you might consider:
  • I think 1000 is an outrageously high amount of simultaneous casters. Depending on how many players the map supports, how many units have the ability, the ability's cooldown and how long it lasts, you will probably want to reduce it to 50, or maybe even 30.
  • When it comes to MUI, it will always remain awkward when triggering in GUI. To my best knowledge, MUI can be made with much more ease and style using JASS (people: feel free to disagree, my knowledge isn't all-embracing ;)). Though I can understand if you think that's too hard to learn.
  • You might want to use SetUnitX and SetUnitY instead of Move Unit instantly, because these two functions are said to be faster (they don't interrupt orders or bother with pathing). They can be accessed using Custom script, like this:
    Code:
    call SetUnitX( udg_Caster[udg_Spell_no], GetLocationX( udg_MoveToPoint[udg_Spell_no] ) )
    call SetUnitY( udg_Caster[udg_Spell_no], GetLocationY( udg_MoveToPoint[udg_Spell_no] ) )

so... what do i have to add or remove
i dont under stand what ur saying about the condition
i used 1000 because thats how many it said in the turtoral i used
how do i check all thousand possible casters and move them if applicable.

or maby put this number down the spell wont be having many units using(probly a max of 10) the cool down is farly high

i dunno what unitx and unity does or will do please explane
 

Grurf

Ultra Cool Member
Reaction score
30
Hmmm... Could you post a link to the tutorial you're using?

I'll explain the condition first.
If (...) N[Spell_no] Greater than or equal to Distance[Spell_no]
This condition is supposed to return true when the caster should stop sliding. It checks whether N is greater than or equal to Distance, or, in other words, whether the caster has slided the distance to the target point yet. To make this work, N should be incremented with the slided distance every time the caster is moved, and Distance should be set to the distance between the position of the caster and the target point at the moment the spell is casted. I hope this makes it more clear to you.

You can use 1000 for now, that's fine, I just wouldn't use it in a final version if it isn't needed, as it does have a small impact on your map's performance.

Your tutorial should say how to check all thousand casters, or it would be a strange tutorial (unless I am mistaken).

About SetUnitX and SetUnitY: this is just an optimization; I would try to get the spell working first, and then consider trying this.
 

millzy

Ultra Cool Member
Reaction score
44
Hmmm... Could you post a link to the tutorial you're using?

I'll explain the condition first.This condition is supposed to return true when the caster should stop sliding. It checks whether N is greater than or equal to Distance, or, in other words, whether the caster has slided the distance to the target point yet. To make this work, N should be incremented with the slided distance every time the caster is moved, and Distance should be set to the distance between the position of the caster and the target point at the moment the spell is casted. I hope this makes it more clear to you.

You can use 1000 for now, that's fine, I just wouldn't use it in a final version if it isn't needed, as it does have a small impact on your map's performance.

Your tutorial should say how to check all thousand casters, or it would be a strange tutorial (unless I am mistaken).



About SetUnitX and SetUnitY: this is just an optimization; I would try to get the spell working first, and then consider trying this.

ok heres the tutorial for the mui

ok for the condition(in my eyes) your telling me what the trigger does not how to make the condition and make it work

u talking about this part?
Code:
 If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                N[Spell_no] Greater than or equal to Distance[Spell_no]
            Then - Actions
                Set spellon[Spell_no] = False
                Unit - Turn collision for Caster[Spell_no] On
            Else - Actions
 

Grurf

Ultra Cool Member
Reaction score
30
Are you following the mentioned tutorial as a whole? I'm asking this because the system depends on certain ghost units, and it's not gonna work without them if you don't modify it severely.

Do you just want to make a single MUI slide spell or are you planning to make more MUI spells in the same map? In the first case, I could give some suggestions to make the slide spell MUI without ghosts, but in the second case, I would recommend fully implementing the system from the tutorial, analyzing the example spells and trying to make a few simple spells of your own first. You'll be needing the knowledge anyway.

About the condition issue: you should add a Set Variable for Distance to set it to the distance between CasterPosition and MoveToPoint, if that action doesn't exist yet. You should also change "Set N[Spell_no] = 25.00" to "Set N[Spell_no] = N[Spell_no] + 25.00".
 

millzy

Ultra Cool Member
Reaction score
44
Are you following the mentioned tutorial as a whole? I'm asking this because the system depends on certain ghost units, and it's not gonna work without them if you don't modify it severely.

Do you just want to make a single MUI slide spell or are you planning to make more MUI spells in the same map? In the first case, I could give some suggestions to make the slide spell MUI without ghosts, but in the second case, I would recommend fully implementing the system from the tutorial, analyzing the example spells and trying to make a few simple spells of your own first. You'll be needing the knowledge anyway.

About the condition issue: you should add a Set Variable for Distance to set it to the distance between CasterPosition and MoveToPoint, if that action doesn't exist yet. You should also change "Set N[Spell_no] = 25.00" to "Set N[Spell_no] = N[Spell_no] + 25.00".

i dunno yet if im going to add any more mui triggerd spell yet
oh yer shit for for got the
Set N[Spell_no] = 25.00" to "Set N[Spell_no] = N[Spell_no] + 25.00

also is there away to add damage to the units that come in x range of the caster

um i g2g i know u will help me in the long run ty for evry thing i dunno what 2 do but i g2g

TY IN ADVANCED +REP
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • 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!
    +1
  • 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
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      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