I Wanna Community

Fangames => Game Design => Programming Questions => Topic started by: Realtime911 on April 16, 2015, 02:57:02 AM

Title: Spinning Cherry?
Post by: Realtime911 on April 16, 2015, 02:57:02 AM
Can someone tell me how to make a spinning cherry attacks? like the one Flandere Scarlet attack on The Guy boss fight at KTK2?
Any help would be appreciated!
(Sorry if that is bad english)
Title: Re: Spinning Cherry?
Post by: Sudnep on April 16, 2015, 06:32:50 AM
i dont know why the code thing is squished. probably a bug with the new forums

Put this in the cherry step event
(click to show/hide)

Scripts to make it run.
(click to show/hide)

How to run it:

Run this script with variables associated like thie
Code: [Select]
with(delicious_fruit) { scrMakeCherrySpin(object,x,y,speed,direction,radiusMax,radiusDev) }object =  object name ( if no object set it to 1 )
x = if no object, set this to x pos you want it to rotate around
y = if no object, set this to y pos you want it to rotate around
speed = how fast it rotates around object / x,y cord
direction = 1 for clockwise; 0 for counterclockwise (i forgot which one it is)
radiusMax = maximum radius it is allowed to expand to (for cases where you want the circle thing to expand out a certain amount)
radiusDev = the speed at which it expands

This is what I use to make shit spin. There are probably easier ways but this is how I do it.

Title: Re: Spinning Cherry?
Post by: RandomFangamer on April 17, 2015, 05:32:58 PM
I think there is a way to make a sprite spin in the GameMaker Sprite editor

(https://imgur.com/FLr7l3U.png)

(https://imgur.com/iUajPme.png)

Of course, before you select this action you should double the canvas size and place the delicious fruit in the middle to keep the stem from getting chopped off
Title: Re: Spinning Cherry?
Post by: Realtime911 on April 17, 2015, 07:51:54 PM
Finally it works, Thank you for all replies!
Title: Re: Spinning Cherry?
Post by: Zurai on April 25, 2015, 02:03:35 AM
I think there is a way to make a sprite spin in the GameMaker Sprite editor

(https://imgur.com/FLr7l3U.png)

(https://imgur.com/iUajPme.png)

Of course, before you select this action you should double the canvas size and place the delicious fruit in the middle to keep the stem from getting chopped off

Never do that! It takes way to much time. To make an object rotate around it's own x/y axis just put into the step-event of that object: image_angle += x.
That means, that every step (frame) the sprite angle of that object is rotated by x. As higher x, as faster it rotates. For clockwise rotation just use "image_anglé -= 5.
Important note: The origin of the sprite as to be the centered. So double-click on the sprite and click on "center". Done!
Title: Re: Spinning Cherry?
Post by: RandomFangamer on April 27, 2015, 04:28:56 PM

Never do that! It takes way to much time. To make an object rotate around it's own x/y axis just put into the step-event of that object: image_angle += x.
That means, that every step (frame) the sprite angle of that object is rotated by x. As higher x, as faster it rotates. For clockwise rotation just use "image_anglé -= 5.
Important note: The origin of the sprite as to be the centered. So double-click on the sprite and click on "center". Done!

Thanks Zurai, I may use this in my game :denMiku_v2: