• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

GML mark of the ninja visual queue for sounds

M

Matthew Imamura

Guest
Hi i'm having trouble imitating the ringlike visual queue to represent the sounds. I got the the rings appearing every .5 seconds when running but I cant figure out how to erase them. they just stay there and slowly fill up the map. i was wondering if anyone can help me with that?
 

Attachments

obscene

Member
Well, we have no idea how you made those rings so can't tell you how to change it. :) Are they instances? Are they being scaled? Are you drawing circles?
 
M

Matthew Imamura

Guest
Well, we have no idea how you made those rings so can't tell you how to change it. :) Are they instances? Are they being scaled? Are you drawing circles?
thank you for replying so fast! I actually just figured out how to do it 1 minute ago. so basically every time the player moves, the obj_ring will be created on the player (since its a ring, it will appear around the player). I solved this by adding an event for the obj_ring. I don't really know how to explain it so here is the code i used. hopefully it can help someone else in need :D .


create

image_xscale = 0.1;
image_yscale = 0.1;



step

image_xscale = min(image_xscale + 0.05, 1.2)
image_yscale = image_xscale;

if image_xscale == 1.2 instance_destroy(obj_nspdsound)
 
Last edited by a moderator:
M

Matthew Imamura

Guest
thank you for replying so fast! I actually just figured out how to do it 1 minute ago. so basically every time the player moves, the obj_ring will be created on the player (since its a ring, it will appear around the player). I solved this by adding an event for the obj_ring. I don't really know how to explain it so here is the code i used. hopefully it can help someone else in need :D .


create step

image_xscale = 0.1; image_xscale = min(image_xscale + 0.1, 1.2)
image_yscale = 0.1; image_yscale = image_xscale

if image_xscale == 1.2 instance_destroy(obj_ring)
i'm also new at doing this so I don't really know if its an instance, or if they are being scaled, or if i'm drawing circles. my guess is i'm drawing circles?
 
It is an object you are creating (the class, or type), and an instance would be when you are referring to a specific individual id of that object. The two have different ways to access them, and the application will have a massively different effect.

In your code there is an example of where you are not making this distinction:

Code:
if image_xscale == 1.2 instance_destroy(obj_nspdsound)
when you are doing the instance_destroy it will be applied to every instance that is obj_nspdsound, because it is using an object reference. So, even though the code is brought about by the circumstances of the instance running it (image_xscale == 1.2 is a code that uses its own specific details) the end result will be applied to every instance of obj_nspdsound because you aren't using a function related to "self" rather than the object.

Code:
if image_xscale == 1.2
{instance_destroy();}
would only destroy the instance that has met this condition, rather than every single one that currently exists, as it is applying it to itself
 
M

Matthew Imamura

Guest
It is an object you are creating (the class, or type), and an instance would be when you are referring to a specific individual id of that object. The two have different ways to access them, and the application will have a massively different effect.

In your code there is an example of where you are not making this distinction:

Code:
if image_xscale == 1.2 instance_destroy(obj_nspdsound)
when you are doing the instance_destroy it will be applied to every instance that is obj_nspdsound, because it is using an object reference. So, even though the code is brought about by the circumstances of the instance running it (image_xscale == 1.2 is a code that uses its own specific details) the end result will be applied to every instance of obj_nspdsound because you aren't using a function related to "self" rather than the object.

Code:
if image_xscale == 1.2
{instance_destroy();}
would only destroy the instance that has met this condition, rather than every single one that currently exists, as it is applying it to itself
Thank you for this. I tried it out and it made the animation more smooth. i'm sure I can use this info for more stuff too. :D
 
Top