E
ebi_nebby
Guest
Hi there, I'd like to ask some questions:
When we make a new object, does something always need to be written in create? (Sorry I am so new to this) for example, I was trying to create a simple space shooter ish game, and I got a sprite to move around and such, however the "power up" does not move around.
for the power up, I set an alarm (I wanted it to randomly move around because I eventually wanted the player to be able to get power ups while avoiding enemies
alarm[0]=60
and in the alarm, I wrote
if (alarm[60]<0)
{
alarm[60]=60
}
direction=irandom_range(0,359)
speed=2
and in draw, I wrote
repeat (10)
draw_sprite(sprite1,0,100,100)
Because I wanted to have 10 powerups moving randomly.
Thank you,
Ebi
(EDIT)
thanks everyone for the help
When we make a new object, does something always need to be written in create? (Sorry I am so new to this) for example, I was trying to create a simple space shooter ish game, and I got a sprite to move around and such, however the "power up" does not move around.
for the power up, I set an alarm (I wanted it to randomly move around because I eventually wanted the player to be able to get power ups while avoiding enemies
alarm[0]=60
and in the alarm, I wrote
if (alarm[60]<0)
{
alarm[60]=60
}
direction=irandom_range(0,359)
speed=2
and in draw, I wrote
repeat (10)
draw_sprite(sprite1,0,100,100)
Because I wanted to have 10 powerups moving randomly.
Thank you,
Ebi
(EDIT)
thanks everyone for the help
Last edited by a moderator: