【GAMEMAKER】Spiral

 Information about object: obj1

Sprite: spr_obj__1
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent:
Children:
Mask:
No Physics Object
Create Event:
jump to position (window_get_width()/2,window_get_height()/2)
set variable Counter to 0
Step Event:
execute code:

Counter+=1;
if Counter=5 {
  obj=instance_create(x+5,y+5,obj2);
  obj.center_x = obj1.x;
  obj.center_y = obj1.y;
  obj.angle = 180;
  obj.radius = 5;
  obj.angle_step = -5;
  Counter=0;
}
if keyboard_check(vk_left) x-=1;
if keyboard_check(vk_right) x+=1;
if keyboard_check(vk_up) y-=1;
if keyboard_check(vk_down) y+=1; 

Information about object: obj2
Sprite: spr_obj__2
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent:
Children:
Mask:
No Physics Object
Step Event:
execute code:

angle += angle_step;
x = obj1.x - (radius * cos(angle * 3.14 / 360));
y = obj1.y + (radius * sin(angle * 3.14 / 360));
radius+=0.1
Other Event: Outside Room:
destroy the instance

No comments:

My New Favorite Music Genre Is Polish Noir

These 10 artists create music that is mystical, melancholy, magical, and more. ͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏    ...

Contact Form

Name

Email *

Message *