Jump to content
A 2021 backup has been restored. Forums are closed and work in progress. Join our Discord server for more updates! ×
SoaH City Message Board

MMF2 Slope Problem with 360 Engine


DizzyDoo

Recommended Posts

Hi, lurker here,

I've been playing around with Damizean's base sonic 360 engine for MMF2 (http://www.sonicfangameshq.com/forum/showthread.php?t=3894) and am attempting to make the player bigger.

Now, so far this has been rather straightforward, as most detectors are happy to be moved around. For example:

Floor(FloatX( "Player_MovementValues" )-Cos(Angle( "Player_MovementValues" ))*6)[/CODE]

The distance of this sensor's x position is manipulated by simply changing the value (6, in this case). However, when it comes to two sensors, Player_SensorLeftAngle and Player_SensorRightAngle, the two that detect the gradient of the slope, it doesn't seem to work this way, or rather, it works confusingly.

For setting either one's x position, I can look at:

[CODE]Floor(FloatX( "Player_MovementValues" )-Cos(Angle( "Player_MovementValues" ))*5+Sin(Angle( "Player_MovementValues" ))*Distance( "Player_SensorLeftAngle" ))[/CODE]

Ah ha, seems simple enough, just change that 5 to change the distance. See, that works, but for the y position...

[CODE]Floor(FloatY( "Player_MovementValues" )+Sin(Angle( "Player_MovementValues" ))*5+Cos(Angle( "Player_MovementValues" ))*Distance( "Player_SensorLeftAngle" ))[/CODE]

That looks almost identical, except of course for changes in the trig stuff. But when I change this particular value of 5, absolutely nothing happens. :( I can set it to 600 or -1000 and the little sensors stay at their same position as they always were.

Clearly I am not understanding something here, but I don't see why the x position setting event would work and the almost identical y setting event would fail.

Any help from an MMF2 user (or even Damizean himself) as to what exactly is going on here would be so very much appreciated.

Thanks.

Link to comment
Share on other sites

Yeah, you should change the number of iterations the angle detection loop performs. It initially is at 20, but you can change it to more or less depending on the new size of the masks.

(For example, I've been doing some tweaks for boredom to make use of a giant Sonic sprite, and I've increased the size of all the masks by 1.5, and had to increase the angle iterations to 40).

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...