8 months ago

(இ﹏இ`。) thank you internet stranger (இ﹏இ`。)


In game maker specifically you may use following:

		
			direction = point_direction(x, y, x+x_speed, y+y_speed) speed = point_distance(x, y, x+x_speed, y+y_speed)
		
	

(compare current and future x/y coordinates and return values)

Reverse the process to get x/y_speed:

		
			x_speed = lengthdir_x(speed, direction) y_speed = lengthdir_y(speed, direction) Note: Added this post because its still viewed in relation to Game Maker: Studio and its specific functions. Maybe it has no value for the person who asked originally but i hope it will help some Game Maker users who wander here
		
	


6 comments

Loading...

Next up

OMGOSH Someone just subbed to me on #Kofi!

Thank you so much for your T2 membership Jana, I sincerely appreciate your support!

It will really help me out a lot!

Now I have Fireballs!

I now have Magic!

kinda.

Happy #WIPWednesday!

Are you working on a game?

Making some art?

Practicing a song?

Something else?

Tell us in the comments!

Got around to adding some blending between the Beach and Desert now i should probably populate the Beach with some things to make it a bit nicer to look at!

Will do tile variants like I have for Grassland, but I'd like objects to interact with too.

Happy #WIPWednesday! Are you working on a game? Making some art? Practicing a song? Something else? Tell us in the comments!

Ok, got some tile variations on the Beach, but it's just RNG. I need to work out some patterns and use those instead. I had some with little bits of grass but they looked bad.

Also added Shells and Glass Bottles.

Huzzah! I now have AoE attacks!

I've swapped to having Magic Staffs instead of having to hold a second button to use Magic.

I'll see what else I can come up with but this fixes the keyboard ghosting issue for now.

Happy #WIPWednesday! Are you working on a game? Making some art? Practicing a song? Something else? Tell us in the comments!

Hmm. Attack movement (for spells) set attacks to use if runSysTimer mod 10 == 0, instead of the if alreadyHit == false, to run the collision code.

Seems to work I should probably experiment to see how infrequent I can be with the trigger.