Need help: having a enemy shoot toward you

Get help using Construct 2

Post » Wed Oct 30, 2013 3:45 pm

Great!
As I progress through this each step creates new challenges. Now when trying to have the star cause damage to the ninja that throws it by setting up a collision it automatically collides when spawned. I tried making the polygon collision area smaller but it seems to still kill itself.

Any idea's on how to have it span stars that are redirected back to it to kill it but not kill it right off at the beginning?
B
10
S
3
Posts: 113
Reputation: 1,191

Post » Wed Oct 30, 2013 4:29 pm

Give the star a CanHurtNinja boolean variable and set it to false..

In the same event you redirect the star set the variable to true

star on collision with ninja
if CanHurtNinja is true
- Hurt Ninja.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed Oct 30, 2013 5:05 pm

Got it but I'm stuck on how to set it up to hurt the ninja.
I created a variable NinjaLife=10

But I can't get from the CanHurtNinja=true to it actually killing the little bugger.
B
10
S
3
Posts: 113
Reputation: 1,191

Post » Wed Oct 30, 2013 7:25 pm

star on collision with ninja
if CanHurtNinja is true
- star destroy
- ninja subtract 1 from ninjalife

ninjalife = 0
- ninja destroy

or something similar..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Thu Oct 31, 2013 2:07 am

I can't seem to pull up the 'if CanHurtNinja' is true to get through it.
It is set but I'm having trouble pulling up that option.
B
10
S
3
Posts: 113
Reputation: 1,191

Post » Thu Oct 31, 2013 9:26 am

In the event sheet you can call it by:

Star is boolean instance variable set CanHurtNinja
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Thu Oct 31, 2013 11:17 am

Feeling stupid. Can't seem to get what you are obviously pointing out.

Here's where I am so far:
https://www.dropbox.com/s/2w8h6r5nda2fw71/Ninja_Slice8.capx
B
10
S
3
Posts: 113
Reputation: 1,191

Post » Thu Oct 31, 2013 12:13 pm

Added the condition for the collision, also added a sytem trigger once and distance condition to the slicing, for the sound went crazy and you could just keep slicing over the ninja to win.
Removed the action to hurt ninja on slice.

Improved
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Thu Oct 31, 2013 1:36 pm

Wow Stain thanks so much. I'm going to have to credit you of course >;)

One more thing and I think I can figure out the rest from here (at least for now >;)

I'm trying to create a simple in between level one and level two scene where the throwing star ninja drops down into position then starts throwing. I can't seem to find a simple move to command to achieve this. It has to be stupidly simple and I'm missing it.
B
10
S
3
Posts: 113
Reputation: 1,191

Post » Thu Oct 31, 2013 2:03 pm

Actually, a simple move to command doesn't exist, haha..

If you want to keep it really simple, you should use the most used 3rd party plugin conveniently called MoveTo.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: Google [Bot] and 13 guests