Pirate Ship shooting Cannon ball

This forum is currently in read-only mode.
From the Asset Store
Shoot balls to destroy as many blocks as possible, at each stage the game will become more difficult.
  • Ok so basically im trying to get a pirateship to shoot a cannon ball, simple right? I should use the

    On key pressed space

    spawn "cannonball"

    type thing.

    But for some reason it will not spawn?

    http://files.filefront.com/Piratebattle ... einfo.html

    I've tried spawning other objects without success. What am I doing wrong?

  • Your "Weapons" group is disabled. Right click it, go to edit group, and uncheck "Disable group by default"

  • Thanks

  • Also any idea why the ship continues to move even when i do "On key release deactivate bullet"?

  • The "On key released" events shouldn't be sub-events. If a key is released, then the "Key is down" condition won't run, and thus the sub-events inside won't run either, therefore it won't know register when the key is released.

  • Ah i see, thanks.

    Another question, when i change the ships direction, how do i make the cannon ball shoot in the other direction? Instead of always shooting to the right?

    I changed the cannonball from a physics with bullet to just physics, and then used Always set force.

    So how would I change the direction with that?

    I want the cannonball to do a nice curve up and then down

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Anyone?

  • you could attach a cannon so you could shoot at different angles. You could also use ball behavior to simulate the ballistics. Let the player adjust the cannon angle, and the physics or ball behavior (with high gravity settings) will take care of the arc for you.

    <img src="http://pictures.kdesmo.com/cannonArc3.jpg">

  • Genious! So what do I exactly make the turret out of? turret behavior? Also could you send me the sprite for that cannon. I'm kind of new to construct i need a more in depth explanation.

    EDIT:

    So far I've gotten a cannon sprite and then Controlling it with when key down cannon.angle+2 and cannon.angle-2

    when I angle the cannon to shoot on an arc, the ball doesn't change it's trajectory according to the angle, also how do i make the ball destroy itself after it goes through its arc to make it seem like it is "Hitting the water" or "Hitting a boat"

  • http://www.mediafire.com/?sharekey=4e7756559772acd2d956df2962098fcb4dac8e31abb47b805be6ba49b5870170

    revised a few things for demonstration purposes. I get the feeling you're trying to do things the hard way. Try going through the GhostShooter and Platform School tutorials - you will find the answers to a great many questions by inspecting their properties in detail. No need to rush, Construct will get you there.

  • I'm not totally new to construct I've gone though those tutorials, i'm just not sure what the best way is to do things, also for some reason I can't download the cap

  • Ok The download worked, I've got most of the stuff i want working except player 2's cannon balls get destroyed instantly if the angle of the cannon isn't like 20 degrees or higher for some reason, everything is the same as player 1 so I'm confused.

  • I only edited pirateship1. Edit pirateship2 so its hotspot is at the waterline - compare it to pirateship1's hotspot.

  • Ah thanks, I also would have never thought of changing the ships width and then comparing its Y position with the cannonballs to make the splash.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)