Setting X position to X Object @ XActionPoint?
I am trying to think of a method here as to setting the x position of one object to x position of another object at Action Point.
Here is what I want to say:
['Platform' is overlapping 'Player Floor Detector']
-> [Platform]: Set X Coordinate to X( "Player Floor Detector" ) @ XActionPoint( "Platform" )
In other words, if I leave '-> Set X Coordinate to X( "Player Floor Detector" )' like that, the platform object sets its x position at its hot spot.
I want it to set X position of platform to X of floor detector at platforms's action point. How do I do this?
Re: Setting X position to X Object @ XActionPoint?
Hmm. Well, the Set X Co-ordinate actions work with the hot spot as that's used as the actual position of the object. You could do it with a bit of mathematics, though, as there are expressions for retrieving the action point coordinates...
-> Set X Coordinate to X("Player Floor Detector") + (XActionPoint("Platform") - X("Platform"))
(No guarantees whether this actually works as-is without fatal mathematical flaws, my head is going strange at the moment)
Re: Setting X position to X Object @ XActionPoint?
No, that doesn't seem to work.
So, I suppose considering there is no correct MMF2 meaning to 'Set X Coordinate to X( "Player Floor Detector" ) @ XActionPoint( "Platform" )', I take it I have to change the hot spot to where I want it positioned.
Originally the hot spot of the platform was 0,0, while the action point was top-center of the object. so I guess I have to set the hot spot to the top-center of the image to make this work.
Re: Setting X position to X Object @ XActionPoint?
You could set the position to where you want it to go -16 or half the width of your platform.