Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE:
- reload=0;
- re=30;//reload time, in steps(30=1 second)
- spd=4;//bullet speed
- damage=10;//bullet damage
- acc=5;//accuracy, the higher it is, the less accurate
- STEP:
- re=max(0,re-1);
- SCRIPT:
- if mouse_check_button(mb_left)
- {
- if reload==0
- {
- var i;
- i = instance_create(x,y,obj_energy);
- i.image_angle = point_direction(x,y,mouse_x,mouse_y);
- i.direction = image_angle+random(acc)-random(acc);
- i.speed = spd;
- i.damage = damage;
- reload=r;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement