How do I spawn something in front of the character?

0 favourites
  • 8 posts
From the Asset Store
50 front view of buildings JPG - residences shops and offices - 2048x2048
  • Another game I have in the works is where you're a baby dragon fending off knights from your cave and to do this you spit fireballs at them while not spitting fireballs at the prince or princess since they give you power-ups. you drag the baby dragon up and down the screen to line it up with tunnels where the knights, princes and princesses spawn.

    So my questions:

    Can I still use a drag and drop feature even if tapping the dragon will cause the fireballs to shoot out?

    how can I make the fire balls spawn in front of the dragon?

    thanks.

  • So my questions:

    Can I still use a drag and drop feature even if tapping the dragon will cause the fireballs to shoot out?

    how can I make the fire balls spawn in front of the dragon?

    thanks.

    Hi, Kristi.

    First, sorry for my english

    Well... to spawn the fireballs in front, just use the "Move to object" action and choose "in front" of the dragon. Put this in the same event of the spawn.

    About the drag and drop thing, probably you'll have to use a boolean or something like that...

    If you need some help, just send me a pm.

    Cheers

  • About the drag and drop, why don't you do a quick test? I haven't used drag and drop but I'm presuming that when you have 'dropped', the sequence is over and you can then just sense another click/touch to shoot the fireball. As far as spawning in the right place, create an Image Point on your dragon sprite in the right place, then get the Dragon to Spawn Object using that object point. why take the discussion offline when others can benefit?

  • codah: I'll give it a try. I'm using the Drag and Drop behaviors and I just restricted it to up and down I'll see if I can get the fireballs to spawn on release.

    Could you provide an image please? I'm kinda of a visual learner.

    : If I need more help I'll just post here so others can get help as well.

    Edit: I've managed to get the fireballs to spawn on release, but they are shooting up not to the left. Any suggestions?

    Edit2: Okay now I have the fireballs going horizontal but they're going behind the baby dragon and not to the left.

    Edit3: I figured it out just had to rotate my sprites a bit.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • codah: I'll give it a try. I'm using the Drag and Drop behaviors and I just restricted it to up and down I'll see if I can get the fireballs to spawn on release.

    Could you provide an image please? I'm kinda of a visual learner.

    : If I need more help I'll just post here so others can get help as well.

    Edit: I've managed to get the fireballs to spawn on release, but they are shooting up not to the left. Any suggestions?

    Edit2: Okay now I have the fireballs going horizontal but they're going behind the baby dragon and not to the left.

    Edit3: I figured it out just had to rotate my sprites a bit.

    So, everything is working fine now?

  • > codah: I'll give it a try. I'm using the Drag and Drop behaviors and I just restricted it to up and down I'll see if I can get the fireballs to spawn on release.

    >

    > Could you provide an image please? I'm kinda of a visual learner.

    >

    > : If I need more help I'll just post here so others can get help as well.

    >

    > Edit: I've managed to get the fireballs to spawn on release, but they are shooting up not to the left. Any suggestions?

    >

    > Edit2: Okay now I have the fireballs going horizontal but they're going behind the baby dragon and not to the left.

    >

    > Edit3: I figured it out just had to rotate my sprites a bit.

    >

    So, everything is working fine now?

    Took quite a bit of trial and error and a grilled cheese sandwich but yes I managed to figure it out.

  • Sorry I had to leave but it was late here 😀 I hope you got it sorted.

  • codah: Don't worry I was able to figure it out, turned out it was just the angle of my sprites. A little rotating did the trick.

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