Make units move in a circular fashion

Zealot

Member
Reaction score
11
I'd like to know a way using GUI to make a unit move in a way the lightning shield orbs move around a hero or make the unit move in a random direction in a region around a hero but it can't go out of the hero's invisible region borders (only if it didn't catch up). I'd like a way using (move unit instantly) instead of the order functions. Is there any way? :confused:
 

Moridin

Snow Leopard
Reaction score
144
I'd like to know a way using GUI to make a unit move in a way the lightning shield orbs move around a hero

I've actually made a spell that uses this. Here, for just the movement you would need the first 3 triggers. You can ignore most of the configuirables and the actions meant to start the 4th and 5th triggers.

Or, if your idea is similar, you could just use the spell entirely. :p

make the unit move in a random direction in a region around a hero but it can't go out of the hero's invisible region borders (only if it didn't catch up). I'd like a way using (move unit instantly) instead of the order functions. Is there any way?

I don't exactly know what you mean by this, but there IS a way used for moving units around without ordering them. It's called sliding. Essentially you have a very fast periodic trigger (0.03 to 0.08) and constantly shift the units position by very little, instantly. This gives the illusion that it is "sliding" along the ground, along a set path.
 

Zealot

Member
Reaction score
11
Thanks Moridin I wil ltry to understand how to make a unit spin from your triggers instead of outright copying it.

I don't exactly know what you mean by this, but there IS a way used for moving units around without ordering them. It's called sliding. Essentially you have a very fast periodic trigger (0.03 to 0.08) and constantly shift the units position by very little, instantly. This gives the illusion that it is "sliding" along the ground, along a set path.

I know about the sliding thing, but I don't know how to make the unit to actually move in random directions ,when I try I end up with a unit that can go in one direction only, both ways, but even so only one direction.
 

Moridin

Snow Leopard
Reaction score
144
Well, you can copy my work if you want to. That's why it's in the Resources section. :p

At the same time, it would be good if you understood what was happening so you would know how to change it according to your needs.

but I don't know how to make the unit to actually move in random directions ,when I try I end up with a unit that can go in one direction only, both ways, but even so only one direction.

I still don't understand exactly what you want. What do you want to happen?
 

Zealot

Member
Reaction score
11
I want the unit to move randomly around the hero, the path being as unpredictable as possible, like instead of it moving circularly around the unit it goes berserk in any direction it wants but it still remains around the hero.
 

Moridin

Snow Leopard
Reaction score
144
Oh. That's still pretty easy. What you do is this essentially. Create the unit at the location of the hero. Bring up a random point around the hero in a certain radius and save it's location relative to the hero (easily done using offset). Then you use a slide trigger to move the unit there, while constantly refreshing the relative location, so it moves with the moving hero. Have a real variable store the distance traveled by the point, and when the distance traveled = the distance to the point (implying it's gotten there), you can use this event:

Game - Value of Real variable

To detect the moment the real variable = the distance its supposed to travel. When the trigger with this event fires off, just set a new random point relative to the hero and repeat.
 

Zealot

Member
Reaction score
11
I will try that, but until I managed to take from your triggers what I wanted and I now see what causes the unit to rotate. But what is the integer A for? Is it because you were using multiple units?

Trigger:
  • EN Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Explosive Sling
    • Actions
      • Set FireNado_Caster = (Casting unit)
      • Trigger - Turn on EN Spin <gen>
      • Unit Group - Add (Triggering unit) to EN_casters
      • Set temp_point = (Position of (Triggering unit))
      • Set temp_point_2 = (temp_point offset by 100.00 towards ((Real((Integer A))) x 120.00) degrees)
      • Unit - Create 1 Fireball for (Triggering player) at temp_point_2 facing Default building facing degrees
      • Set FireNado_Tornado1 = (Last created unit)
      • Custom script: call RemoveLocation (udg_temp_point)
      • Custom script: call RemoveLocation (udg_temp_point_2)
      • Set EN_Current_angle[(Integer A)] = ((Real((Integer A))) x 120.00)


Trigger:
  • EN Spin
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • Set EN_Current_angle[(Integer A)] = (EN_Current_angle[(Integer A)] + 12.00)
      • Set Current_unit = FireNado_Tornado1
      • Set temp_point = (Position of FireNado_Caster)
      • Set temp_point_2 = (temp_point offset by 50.00 towards EN_Current_angle[(Integer A)] degrees)
      • Unit - Move FireNado_Tornado1 instantly to temp_point_2
      • Custom script: call RemoveLocation (udg_temp_point)
      • Custom script: call RemoveLocation (udg_temp_point_2)
 

Moridin

Snow Leopard
Reaction score
144
Yes the integer A was because there was a possiblity of more than 1 bomb. It cycled from 1 to the max number of bombs, allowing the looped actions to to work on each one of them.

These actions will not work, seeing as there's no "Integer A".

Set temp_point_2 = (temp_point offset by 100.00 towards ((Real((Integer A))) x 120.00) degrees)

Set EN_Current_angle[(Integer A)] = (EN_Current_angle[(Integer A)] + 12.00)

Set EN_Current_angle[(Integer A)] = ((Real((Integer A))) x 120.00)

Set temp_point_2 = (temp_point offset by 50.00 towards EN_Current_angle[(Integer A)] degrees)

But otherwise the trigger will work :). You just need to replace that with something (1 will work for you btw). Replacing all the integer As with 1s will work.

You should also realise that because you don't have many units to slide, you don't need the EN_Current_angle real variable to be an array.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Howdy
  • 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 Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top