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.

      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