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

[GM7]Balancing?


ZFG

Recommended Posts

Is there a way to make Sonic Balance like this: nr0pbt.gif I'm using Damizean's 360 engine from the site.

I have tried this:

   
//Edge Wobling
   if (hsp = 0 && collision_sensor_right_line( x, y, angle, obj_walls ) == true )
   {
   animation=19;
   }

   if (hsp = 0 && collision_sensor_left_line( x, y, angle, obj_walls ) == true )
   {
   animation=19;
   }

But this makes him play the Animation even though he is not close the an edge.

Link to comment
Share on other sites

I succed at doing this by creating two simple scripts that checks two points.

scrRightPoint:

if collision_point(x+3,y+20,obj_walls,true,false) return true;
else return false;[/CODE]

scrLeftPoint:

[CODE]if collision_point(x+3,y+20,obj_walls,true,false) return true;
else return false;[/CODE]

Then, at draw event, first piece of code, after idle animation code, write this:

[CODE]if (hsp==0 && ground && action==0 && !scrRightPoint() && scrLeftPoint()) {
**Edge wobling animation code**
}[/CODE]

And now, the same but for the other direction (RightPoint && !LeftPoint);

Anf of course, add the layers to the scripts ^^

Hope this works in your engine.

Link to comment
Share on other sites

Sonic Edge Wobbles happen when he's on the edge, thus you're looking for a lack of collision.

   if (hsp == 0 && collision_sensor_right_line( x, y, angle, obj_walls ) == false && ground == true)
   {
   animation=19;
   }
   if (hsp == 0 && collision_sensor_left_line( x, y, angle, obj_walls ) == false && ground == true)
   {
   animation=19;
   }

Or you could try Sponick's method and put it in the End Step event (or really anywhere in a step event) rather than the Draw event. The reason Sonic disappears (I'm guessing) is because you use the default drawing functionality, and putting code in the Draw event disables that functionality.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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