Why won't Grafs move forward?

Need help with any SMBX game-related issues? Ask your questions here.

Moderator: Userbase Moderators

Animebryan
Spike
Spike
Posts: 262
Joined: Fri Jun 03, 2016 5:40 pm
Flair: Need help!
Contact:

Why won't Grafs move forward?

Postby Animebryan » Mon Dec 20, 2021 11:24 pm

I'm starting to hate these npcs with formulaic movement patterns. I had a hard enough time trying to get Eeries to mimic Dragon Heads (Zelda 2) or Medusa Heads (Castlevania) sine wave pattern. But even if I copy & paste that formula

Code: Select all

3 * sin(t * 3);
or the default sine wave formula for Eeries

Code: Select all

cos(t * 4);
, it still won't move forward, like it's set on Don't Move or speed=0. The only way it'll move forward is during it's default Circle Graf pattern

Code: Select all

x=sin(t * 2) * 2; y=cos(t * 2) * 2;
.

I just want a proper sine wave pattern for them! Similar to

Code: Select all

3 * sin(t * 3);

Hoeloe
Phanto
Phanto
Posts: 1465
Joined: Sat Oct 03, 2015 6:18 pm
Flair: The Codehaus Girl
Pronouns: she/her

Re: Why won't Grafs move forward?

Postby Hoeloe » Tue Dec 21, 2021 5:28 pm

Notice how the time it works you're actually assigning something? You need to assign to "x" - i.e., the horizontal position. Just writing some equations out doesn't tell it what you want it to do with that equation. You need to assign it.

Animebryan
Spike
Spike
Posts: 262
Joined: Fri Jun 03, 2016 5:40 pm
Flair: Need help!
Contact:

Re: Why won't Grafs move forward?

Postby Animebryan » Wed Dec 22, 2021 3:45 am

Well to be honest, I never learned about graphing formulas so I actually don't understand it. The only reason I came across the Medusa Head sine wave was by googling it & even then it was a pain in the ass to find a lua formula that works with the editor. It was mostly sheer luck.

So I assume you mean that I need to put x= followed by the formula right? Will that be enough to generate the vertical part of the wave too or do I also need to put a y= as well?

Emral
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 9891
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Phoenix

Re: Why won't Grafs move forward?

Postby Emral » Wed Dec 22, 2021 3:53 am

Yes. You can look at the "Examples" section of the graf's extra settings window for more information on the syntax. There's an example for a circle included to help people get started.

Animebryan
Spike
Spike
Posts: 262
Joined: Fri Jun 03, 2016 5:40 pm
Flair: Need help!
Contact:

Re: Why won't Grafs move forward?

Postby Animebryan » Wed Dec 22, 2021 4:37 am

That's not "More info". What part about
I never learned about graphing formulas so I actually don't understand it.
do you not understand? So far the only thing I learned is that I need to define x with x=, but I don't know if I need a y= as well.
I never needed to define x or y for the Medusa Head sine wave formula for Eeries & it worked perfectly, but when I tried to paste that same formula to Grafs, it doesn't work. It goes up & down but no horizontal movement. Eeries didn't have that problem which means how the formulas work between the two is different & inconsistant, hence the confusion.

When I look at the Graf's Circular Pattern formula, the only difference I see is that x is defined with sin & y with cos, both terms which are completely alien to me but the rest are symmetrical equations (t * 2) * 2, and they somehow form a circular pattern. I don't want a circular pattern, I want a perfect sine wave that's generated by 3 * sin(t * 3); when it's applied to Eeries, like this:

Image
Last edited by Animebryan on Wed Dec 22, 2021 1:59 pm, edited 1 time in total.

MrDoubleA
Edward
Edward
Posts: 396
Joined: Mon Aug 20, 2018 7:02 am
Flair: How much munchers?

Re: Why won't Grafs move forward?

Postby MrDoubleA » Wed Dec 22, 2021 9:18 am

Animebryan wrote:
Wed Dec 22, 2021 4:37 am
That's not "More info". What part about
I never learned about graphing formulas so I actually don't understand it.
do you not understand? So far the only thing I learned is that I need to define x with x=, but i don't know if I need a y= as well.
I never needed to define x or y for the Medusa Head sine wave formula for Eeries & it worked perfectly, but when I tried to paste that same formula to Grafs, it doesn't work. It goes up & down but no horizontal movement. Eeries didn't have that problem which means how the formulas work between the two is different & inconsistant, hence the confusion.

When I look at the Graf's Circular Pattern formula, the only difference I see is that x is defined with sin & y with cos, both terms which are completely alien to me but the rest are symmetrical equations (t * 2) * 2, and they somehow form a circular pattern. I don't want a circular pattern, I want a perfect sine wave that's generated by 3 * sin(t * 3); when it's applied to Eeries, like this:

Image
The reason why is that eeries are hardcoded to always move forward at a certain speed; grafs, however, will always stay to their spawn point, only being offset by the X position given in. To make them move left, you can use functions like:

Code: Select all

x = -t * 1.5; y = cos(t * 4);


Return to “Help and Support”

Who is online

Users browsing this forum: No registered users and 0 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari