Jump to content
  • Advertisement
Sign in to follow this  
SuperMonkey2113

Need help RE Game Maker

This topic is 735 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!