How do I spawn something in front of the character?

Get help using Construct 2

Post » Wed Jun 25, 2014 3:50 am

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.
B
10
S
1
Posts: 69
Reputation: 641

Post » Wed Jun 25, 2014 4:48 am

kristithechocobo wrote: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 :roll:

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
B
20
S
4
Posts: 387
Reputation: 2,274

Post » Wed Jun 25, 2014 5:09 am

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. @Zatah why take the discussion offline when others can benefit?
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Wed Jun 25, 2014 5:48 pm

@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.

@Zatah: 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.
B
10
S
1
Posts: 69
Reputation: 641

Post » Wed Jun 25, 2014 9:07 pm

kristithechocobo wrote:@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.

@Zatah: 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?
B
20
S
4
Posts: 387
Reputation: 2,274

Post » Wed Jun 25, 2014 9:31 pm

Zathan wrote:
kristithechocobo wrote:@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.

@Zatah: 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.
B
10
S
1
Posts: 69
Reputation: 641

Post » Wed Jun 25, 2014 9:43 pm

Sorry I had to leave but it was late here 😀 I hope you got it sorted.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Wed Jun 25, 2014 9:57 pm

@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.
B
10
S
1
Posts: 69
Reputation: 641


Return to How do I....?

Who is online

Users browsing this forum: repkino and 6 guests