some tips.
I Wanna Be the Studio Engine YoYoYo Edition uses objPlayer instead of player as the player object.
Making something (like, say, a mini Hachune Miku) chase the player is easy, simply place this is it's step event.
if (instance_exists(objPlayer))
{
direction=point_direction(x,y,objPlayer.x,objPlayer.y);
}
In the create event just set it's speed to whatever you want.
It's possible to modify all of any given object at once on the screen. Examples include launching all of them at the player, making them all fall down, making them freeze and change color, expand outwards from Miku's hand, etc.
You can either use an alarm, or a tick counter in the boss itself to do this. the important trick is the with statement
So say you've spat out a bunch of objCherryBounceRandom. At a certain point in the song, you want them to stop, and launch a second batch and then later make them all fly outwards.
To pause them all, you simply put in you alarm/step event.
with (objCherryBounceRandom)
{
speed=0;
}
Of course if we were to try to make it fly away, it would still bounce. this will not do. so we need to put in a hook in objCherryBounce to allow the bounce to be bypassed.
Open objCherryBounce. Add to the create event
keep_bouncing=true;
originx=x;
originy=y; ///remember where i spawned so we can fly away from there later.
and then change the Step event to.
if (keep_bouncing)
{
move_bounce_solid(0);
}
Now you can turn off the bounce feature of your bouncing cherries when you need to.
we make them fly off away from Miku's hands with
with (objCherryBounceRandom)
{
speed=6; ///or whatever
keep_bouncing=false;
direction=point_direction(originx,originy,x,y);
}
by swapping originx with x and y with origin y, it will go towards the spawn point instead.
You probably want them to change colors too. in this case, simply make a new object, say objCherryBounceRandomColorable with objCherryBounceRandom as a parent using the white cherry sprite with no events. and then when you spawn then you can
a.image_blend = make_color_rgb(100,255,100);
assuming you used
a = instance_create(spawnx,spawny,objCherryBounceRandomColorable);
to spawn it.
and when you stop them, you can also change the color with
with (objCherryBounceRandomColorable)
{
speed=0;
image_blend = make_color_rgb(10,10,10); ///dark grey
}
You can even use with to change all objects of one type into another. Say you have a negi object that goes a random direction of left or right. (what can i say, it's a classic.
)
with (objCherryBounceRandomColorable)
{
instance_create(x,y,objSidewaysNegi);
instance_destroy();
}
If you need to address different groups of the same object, simple make a child of it with no events.
Coding objSidewaysNegi is left as an exercise to the reader.
As we can see, the possibilities are limitless.