Circular Path...

warroom99

New Member
Reaction score
15
i am trying to make a MUI boomerang spell

testar2.jpg


i can't get the right formula in getting the right angle and the right polar offset so that the boomerang would form a perfect circle...

i have to get the right arc and use it as degrees...

i think i should use pi here... i don't know where

i uses periodic time 0.03(i think there is nothing to do with it)

variables
speed[array](real) - the distance of polar offset?
arc[array] - the angle added to the boomerang(every period of time) to make it revolve...
i used the custom values of the dummy boomerang as the integer for the array

* pls see post 3
 

Jackal

You can change this now in User CP... or Die Tryin
Reaction score
38
hmmm...

PHP:
Events
Unit casts an ability

Conditions
Ability being cast equal to boomerang

 Actions
Order Boomerang to Move To ((Position of Boomerang Dummy) offset by 100 towards (Facing of Boomerang Dummy) + 45 degrees

Then continuously change it so it goes in a circle using a mix of that and wait actions

EDIT: Oh yeah, you might want to change the offset and degrees ;)
 

warroom99

New Member
Reaction score
15
the need degrees and offset is my problem..

for example...

the distance between castpoint and targpoint is 600 what should be my offset and degrees to make it a perfect circle?
 

Ninja_sheep

Heavy is credit to team!
Reaction score
64
okay, there are like 2 ways to do this:
1. get the point at the middel between the caster and the target point and put the boomerang at a distance of this point and always change the offset by a little so you get a semi-circle.

2. Use the sentence of phytagoras and the sentence of cathetus... but I gues you don't want to do it that way since it's the same and 100000000 times more complicate :>

edit: no you shouldn't use pi xD
 

Jackal

You can change this now in User CP... or Die Tryin
Reaction score
38
the need degrees and offset is my problem..

for example...

the distance between castpoint and targpoint is 600 what should be my offset and degrees to make it a perfect circle?

I'll just get my compass and protractor and figure this out.
 

warroom99

New Member
Reaction score
15
I'll just get my compass and protractor and figure this out.
LOL!! hehehe

but what if it has 1432.55 range? another problem to figure out?

@Ninja_sheep
1. so i'll get the radius and use it as offset while adding up the degrees? (let's say 10, it will be 36 peroidic time to complete the circle right?)

2. if i am going to use points for every boomerang and there are 100 boomerang ther would be hundred points right? won't it be laggy?
 

Jackal

You can change this now in User CP... or Die Tryin
Reaction score
38
Ok, I've tried to figure out the degrees it should be facing, and its annoying me so I give up for now :banghead:
 

Ninja_sheep

Heavy is credit to team!
Reaction score
64
>1. so i'll get the radius and use it as offset while adding up the degrees? (let's say 10, it will be 36 peroidic time to complete the circle right?)

y, beside you propably want a semi circle ----> only 10 moves if you do 18 degrees per move :)

>2. if i am going to use points for every boomerang and there are 100 boomerang ther would be hundred points right? won't it be laggy?

well, I think it will be laggy if many boomerangs - in both ways. 100 periodic 0.03 timers will propably cause lag. Propably this way is even faster then the first since it uses les actions and more math. But to do it you have to be familiar with the Pythagorean Theorm and the Euclids Prove
 

Frozenwind

System maker
Reaction score
99
I've made a MUI boomerang spell for my TD,
it moves like this:
Code:
OOOOOOOOOOOO
O          O
O  O [COLOR="Red"]O[/COLOR]     O
O O  [COLOR="Red"]O[/COLOR]     O
OO   [COLOR="Red"]O[/COLOR]     O
       OOOO
Hard to draw like this...
The red way is his start direction, and then it circles around you untill it hits you.
Like I said it's for a TD, so my tower doesn't move:)

I done that like this:
  • move your boomerang every 0.05 seconds to his own spot with a small fofset
  • make your boomerang face your unit every 1 second over (x) seconds.
  • reduce x by a small amount so you can be sure it will reach your unit once.
This is a bit of a hungry felhound spell....
You might wanna use it...

And for your thingy:
I'd say move your boomerang instantly to the center of your circle and slowly decrease the offset and increase the angle.
You might use a formula like: 360/angle = offset.
Then you got a offset of 0 when it went 360°.

frozenwind.
 
Reaction score
333
The center of the circle is the average of casters center and the targets center. The radius of the circle is half the distance between caster and target. You can get a circular motion like this:

Code:
Event: Every X Seconds.

Action: Set Temp_Int = Temp_Int + 10
Move <Boomerang> to <Average of casters and targets position> offset by <Half the distance between target and caster> towards <Temp_Int> degrees.
 

warroom99

New Member
Reaction score
15
>1. so i'll get the radius and use it as offset while adding up the degrees? (let's say 10, it will be 36 peroidic time to complete the circle right?)

y, beside you propably want a semi circle ----> only 10 moves if you do 18 degrees per move :)

>2. if i am going to use points for every boomerang and there are 100 boomerang ther would be hundred points right? won't it be laggy?

well, I think it will be laggy if many boomerangs - in both ways. 100 periodic 0.03 timers will propably cause lag. Propably this way is even faster then the first since it uses les actions and more math. But to do it you have to be familiar with the Pythagorean Theorm and the Euclids Prove
>1 i tried doing that and the time of the boomerang to return is always the same(no matter how far is it).

so when the radius is 350 and the other is 900 the one with 900 radius revolves very fast...

it them them 0.60 secs to revolve around the revolvepoint...

how can i make it slower when it has a larger radius?
 

Ninja_sheep

Heavy is credit to team!
Reaction score
64
well, I think the only way is to do a formula based on the radius. I can calculate this for you (propably) but it will take a little time. I'll post it today in the evening or tomorrow.

oh, and i made the formula for the second point (if you are still interested)

okay, first set 2 variables:
the line the boomerang passes first (600 range) + line from the caster position and the position the boomerang would have if not flying in a semi circle.
first variable = S
second variable = D

(((Root(S*D))^2)-D^2) = the distance of the straigt line to the point where the boomerang currently is (you have to define angle before). If you want I can draw it for you, but just if you want.
 

takethat

Active Member
Reaction score
12
turning?

Code:
Turn Left
    Events
        Player - Player 1 (Red) Presses the Left Arrow key
        Player - Player 2 (Blue) Presses the Left Arrow key
        Player - Player 3 (Teal) Presses the Left Arrow key
        Player - Player 4 (Purple) Presses the Left Arrow key
        Player - Player 5 (Yellow) Presses the Left Arrow key
        Player - Player 6 (Orange) Presses the Left Arrow key
        Player - Player 7 (Green) Presses the Left Arrow key
        Player - Player 8 (Pink) Presses the Left Arrow key
        Player - Player 8 (Pink) Presses the Left Arrow key
        Player - Player 9 (Gray) Presses the Left Arrow key
        Player - Player 10 (Light Blue) Presses the Left Arrow key
        Player - Player 11 (Dark Green) Presses the Left Arrow key
        Player - Player 12 (Brown) Presses the Left Arrow key
    Conditions
    Actions
        Unit Group - Pick every unit in (Units owned by (Player((Player number of (Triggering player)))) matching ((Unit-type of (Picked unit)) == ship)) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((((Picked unit) is in SailingShips) == True) or (((Picked unit) is in DivingShips) == True)) or (((Picked unit) is in SlowSailingShips) == True)
                    Then - Actions
                        Set TurnLeft[(Player number of (Triggering player))] = ((Position of (Picked unit)) offset by 10.00 towards ((Facing of (Picked unit)) + 30.00) degrees)
                        Unit - Make (Picked unit) face TurnLeft[(Player number of (Triggering player))] over 0.02 seconds
                        Custom script:   call RemoveLocation( udg_TurnLeft[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
                    Else - Actions
                        Do nothing

When a ship leaves the dock, it will auto sails which using sliding trigger.
the sliding have no problem. However it just don't turn when presses the left arrow key
 
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

      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