Offset is being... odd.

Monsterous

In the Shadows, Lurking.
Reaction score
99
What i want is a unit to keep moving past the target point.
Now, the easiest way i can think of is using an Offset, which i've done. However, the moving unit always moves to the side of the point. However, if i remove the offset, the moving unit goes exactly to the point.
Its strange, because the offset is directed towards that point, so surely the unit would go past the point, as the offset is directed on the unit to the point?

Code:
Unit - Order (Last created unit) to ( Move targeting (ShipPoint offset by 50.0 towards (Point((X of ShipPoint), (Y of ShipPoint))))) (Replace Existing Orders)
I've tried the angle between the two points, and other methods. The unit simply just goes to the offset, disregarding the position of the ship, the angle between two points, or the degree it is moving.

Basically, can anyone give me another way as to how to make a unit target a point, and go past it in the direction its going? Offsets arent working here for unknown reasons to me. Or if anyone can tell me why my action is wrong.
 

Frozenwind

System maker
Reaction score
99
I'm sorry to disapoint you, but the offset behaves as I expect it to behave ;)


What goes wrong?
Basically, what you do is the following:

You order the unit to move to the point (allow me to call it X), with an offset of 50.0 towards the very same point X. However, how can a unit move to point X with an offset of 50.0 towards point X? To translate it:
Code:
Move unit to point X
Offset 50.0
Angle from point X to point X (will most-likely return 0 = east)
An angle between one point doesn't exist. An angle will always be determined by two different points, as it requires two dimensions (or more of course).
I hope the thing between code-tags will explain why it doesn't work.

(Small edit: Actually, it requires any amount of dimensions (in 1 dimension you simply only have 2 angles: left or right (0° and 1°? xD)), but it does require 2 or 3 points. 3 points would be a "math angle", with 2 lines drawn (AB and BC) giving the angle between those 2 lines. Whereas 2 points would be the angle from A to B - which is used in programming - which is now. Technically, this is the same as with 3 points, but one point is imaginary on the x-axis, having the same Y-coördinate as point A)


How to fix it?
I assume you want the ship to move straight over the point? Then I recommend you do this:
[not at home, so I typed it]
Code:
Unit - Order (Last created unit) to ( Move targeting (TargetPoint offset by 50.0 towards (Angle from (Position of (Last Created unit)) to (TargetPoint)))) (Replace Existing Orders)


The (Point(X,Y)) function
One more thing, rather off-topic:
Code:
Unit - Order (Last created unit) to ( Move targeting (ShipPoint offset by 50.0 towards ([COLOR="Green"]Point((X of ShipPoint), (Y of ShipPoint))[/COLOR]))) (Replace Existing Orders)
The green part equals the following:
Code:
(ShipPoint)
 

Monsterous

In the Shadows, Lurking.
Reaction score
99
Very informative.
However, if what you say is true, why wouldnt this work?
Code:
Unit - Order (Last created unit) to ( Move targeting ((Position of Your Ship) offset by 30.0 towards (Angle from (Position of (Last created unit)) to (Position of Your Ship)) degrees)) (Replace Existing Orders)

I tried this, this contains 2 different points, yet the unit goes to the offset, not in a line towards the ship and going past it.
Unless im reading it wrong, the unit should go to an offset of 30 at an angle of the direction of the unit to the ship, which would be its normal movement line, thus it should just move towards the point, and go on its offset.
 

Frozenwind

System maker
Reaction score
99
Few questions:
- Is the "last created unit" on top of the ship (cos then the 2 different points are the same)? --> this will break his "normal movement line" and force him to go to "0°" = east.
- When is the function called? Since if you call it before it passes the ship (makes him move over) and after he passes the ship (makes him move over again - which is backwards), he'll be stacked on top of the ship.
 

Monsterous

In the Shadows, Lurking.
Reaction score
99
Its a seperate unit firing at the ship, so the unit will move towards the ship.
The function is called instantly as the unit is made.
 

Frozenwind

System maker
Reaction score
99
Then it should work, unless:

- Your last created unit isn't created yet (impossible as there always is a last created unit - unless it's your first call - besides that, it responds)
- Is "Your Ship" declared?

If not.. Mind posting your trigger?
 

Monsterous

In the Shadows, Lurking.
Reaction score
99
Amazingly, it now works. I had to recreate it as i had deleted it previously, tested it, and amazingly, it now works even though i did the same thing as i always had.

I thank you for help, and holding my hand trying to find a way to fix my problem.
I've +rep you, and i'd +rep again for your tremendous amount of help, but unfortunately i cant yet :(
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Varine Varine:
    How can you tell the difference between real traffic and indexing or AI generation bots?
  • 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 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