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

Grinding in Damizeans Engine ;e


Recommended Posts

Woo. I'm back here again. Because I am in no way a programmer.

Please help!

I want to impliment grinding in Damizean's engine. And..I'm already running into a block with my first 3 events O_O

I figured I could start with setting the bars for grinding as the qualifier '0' (obstacle) and by default, have flag 0 set on (makes the obstacle non solid). When the bottum sensor is overlapping the bar while ctrl is pressed, I'd set flag 0 off (make the bar a solid). I'd figure out animation and speed from there.

But anytime im jumping onto a bar, or gravity does not equal zero, the game wont detect that the bottum sensor is overlapping the bar. I don't know, it's weird.

Basically, has anyone already successfully implimented grinding in this engine, that would like to help me/and or throw out some code at me? :3

Thank you!

Link to comment
Share on other sites

Here's how I would do it:

Use a new qualifier for the grind bars, so you can group various of those objects. Also, set all the grinding objects with the qualifier 1 (Platform). So, do grinding this way:

While the player is pressing the Button 2, set flag 0 of the grinding qualifier to off. Otherwise, set flag 0 to on. Also, check, while the bottom sensor collides within the grinding qualifier and Sonic is on ground, activate grinding action.

That should work correctly :S

Link to comment
Share on other sites

Let me translate and correct a few things. Create a new parent object that is a child of objSolid, and make that the parent of the grind rail. We'll call it "objSolidGrind." Then, in the player (Sonic), create a script to check if the bottom sensor collides with objSolidGrind. If a collision is detected in the script, then check if the player is holding the correct key. If you want to disable grinding from a fall, check if ground == true, as well. If neither condition is met, the collision should return false; otherwise it should return true. This will create the semi-permiable rail that you want. Make sure to use "maskBig" for the check, too.

Link to comment
Share on other sites

Lol, meep. Aero, I'm sorry, I forgot to mention I'm using the mmfusion version of his engine :00 Thank you, tho.

And w00t! It wooorked Dami. Thank you very much n_n

Now..if anyone wants to make this easy on me and just give me the rest of the coding. :e Ah, I shall probably have to do it myself.

Link to comment
Share on other sites

Dami taught me how to implement it a long time ago. Opening up an old backup of my game, the events are as follows:

If Bottom sensor is overlapping group grinding

If On the floor value = 1

—Set Grind value to 1

—Set Roll value to 0

If On the floor value = 1

If Grind value = 1

If Bottom sensor is not overlapping group grinding

—Set Grind value to 0

If On the floor value = 0

If Grind value = 1

—Set Grind value to 0

You'll also need to add the grind rails to group 1. With this, you should be able to even make grind rail loops.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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