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.
  • The Helper The Helper:
    The bots will show up as users online in the forum software but they do not show up in my stats tracking. I am sure there are bots in the stats but the way alot of the bots treat the site do not show up on the stats
  • Varine Varine:
    I want to build a filtration system for my 3d printer, and that shit is so much more complicated than I thought it would be
  • Varine Varine:
    Apparently ABS emits styrene particulates which can be like .2 micrometers, which idk if the VOC detectors I have can even catch that
  • Varine Varine:
    Anyway I need to get some of those sensors and two air pressure sensors installed before an after the filters, which I need to figure out how to calculate the necessary pressure for and I have yet to find anything that tells me how to actually do that, just the cfm ratings
  • Varine Varine:
    And then I have to set up an arduino board to read those sensors, which I also don't know very much about but I have a whole bunch of crash course things for that
  • Varine Varine:
    These sensors are also a lot more than I thought they would be. Like 5 to 10 each, idk why but I assumed they would be like 2 dollars
  • Varine Varine:
    Another issue I'm learning is that a lot of the air quality sensors don't work at very high ambient temperatures. I'm planning on heating this enclosure to like 60C or so, and that's the upper limit of their functionality
  • Varine Varine:
    Although I don't know if I need to actually actively heat it or just let the plate and hotend bring the ambient temp to whatever it will, but even then I need to figure out an exfiltration for hot air. I think I kind of know what to do but it's still fucking confusing
  • The Helper The Helper:
    Maybe you could find some of that information from AC tech - like how they detect freon and such
  • Varine Varine:
    That's mostly what I've been looking at
  • Varine Varine:
    I don't think I'm dealing with quite the same pressures though, at the very least its a significantly smaller system. For the time being I'm just going to put together a quick scrubby box though and hope it works good enough to not make my house toxic
  • Varine Varine:
    I mean I don't use this enough to pose any significant danger I don't think, but I would still rather not be throwing styrene all over the air
  • The Helper The Helper:
    New dessert added to recipes Southern Pecan Praline Cake https://www.thehelper.net/threads/recipe-southern-pecan-praline-cake.193555/
  • The Helper The Helper:
    Another bot invasion 493 members online most of them bots that do not show up on stats
  • Varine Varine:
    I'm looking at a solid 378 guests, but 3 members. Of which two are me and VSNES. The third is unlisted, which makes me think its a ghost.
    +1
  • The Helper The Helper:
    Some members choose invisibility mode
    +1
  • The Helper The Helper:
    I bitch about Xenforo sometimes but it really is full featured you just have to really know what you are doing to get the most out of it.
  • The Helper The Helper:
    It is just not easy to fix styles and customize but it definitely can be done
  • The Helper The Helper:
    I do know this - xenforo dropped the ball by not keeping the vbulletin reputation comments as a feature. The loss of the Reputation comments data when we switched to Xenforo really was the death knell for the site when it came to all the users that left. I know I missed it so much and I got way less interested in the site when that feature was gone and I run the site.
  • Blackveiled Blackveiled:
    People love rep, lol
    +1
  • The Helper The Helper:
    The recipe today is Sloppy Joe Casserole - one of my faves LOL https://www.thehelper.net/threads/sloppy-joe-casserole-with-manwich.193585/
  • The Helper The Helper:
    Decided to put up a healthier type recipe to mix it up - Honey Garlic Shrimp Stir-Fry https://www.thehelper.net/threads/recipe-honey-garlic-shrimp-stir-fry.193595/
  • The Helper The Helper:
    Here is another comfort food favorite - Million Dollar Casserole - https://www.thehelper.net/threads/recipe-million-dollar-casserole.193614/

      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