Sign in to follow this  
SuperMonkey2113

Need help RE Game Maker

Recommended Posts

Okay I'm new to this so I apologize for any dumb questions I may ask.

So what I am trying to do is create an object for loading create another object to shoot and create the actual ball object. 

I already created the cannon that shoots the object. Now what I want to do is create a loading object that I can put the ball in the loading object and have the cannon shoot. 

(base)+(Ammunition) = Cannon shooting ammunition from another location

In my Cannon i created this
create

Code:
j=-1;
can_join=true;
cool_time=room_speed/2;
ball=noone;
p=600;

alarm 0

Code:
physics_joint_delete(j);
j=-1;
with (ball){
phy_rotation=other.image_angle*-1
physics_apply_local_impulse(0,0,other.p,0);
}
can_join=false;
alarm[1]=cool_time;

alarm 1
 

Code:
can_join=true;

step
 

Code:
if instance_exists(obj_S2){
if place_meeting(x,y,obj_S2) and j=-1 and can_join=true{
obj_S2.phy_position_x=x;
obj_S2.phy_position_y=y;
obj_S2.phy_angular_velocity=0;
j=physics_joint_revolute_create(id,obj_S2,x,y,0,0,0,0,0,0,0);
ball=obj_S2;
alarm[0]=room_speed*2;
}
}

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this