How do I make a Player "could not" jump from sprite?

Get help using Construct 2

Post » Wed Mar 26, 2014 9:41 am

Hi,
As you can see there is my Runner copx file, and I'm working on it.
With "up arrow key" player is jumping,
I want to player could not jump from sprite4! (If it jumps then Player died)
I added another sprite on top of sprite4 to do that, but I 'm sure there has to be another way!

My another question is:
How to disable a keyboard key befor and after gruop action?
In this capx file, if you push Right arrow key, it destroy sprite4 and changed player animation, But I want this key be disable on start game and just be active for each sprite4 that is collision on player!

Code: Select all
https://app.box.com/s/924iazmpg5p58hnenta0

Regards,
Mazdak
B
7
S
1
Posts: 53
Reputation: 545

Post » Wed Mar 26, 2014 9:54 am

I guess you could use the condition "is overlapping at offset"
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 Mar 26, 2014 10:01 am

Just add the condition Sprite is not overlapping Sprite4 to line 4 of your code, that should do it.

As for the second part of your question, then just add a Sprite is overlapping Sprite4 to line 34 (If I understand correctly)
Using R243 for all examples
B
69
S
20
G
6
Posts: 379
Reputation: 9,699

Post » Wed Mar 26, 2014 10:24 am

@LittleStain: I checked it already, doesn't work!
@emoaeden: I didn't understand what do you mean exactly!
B
7
S
1
Posts: 53
Reputation: 545

Post » Wed Mar 26, 2014 10:49 am

@emoaeden: Do you mean like this?!

Image
B
7
S
1
Posts: 53
Reputation: 545

Post » Wed Mar 26, 2014 11:28 am

That is what I had envisioned. It didn't work at all ?
Using R243 for all examples
B
69
S
20
G
6
Posts: 379
Reputation: 9,699

Post » Wed Mar 26, 2014 11:40 am

Unfortunately not!
B
7
S
1
Posts: 53
Reputation: 545

Post » Wed Mar 26, 2014 4:29 pm

Maybe there is some custom behavior?!
B
7
S
1
Posts: 53
Reputation: 545

Post » Fri Mar 28, 2014 8:06 am

In this case when the first sprite (sorite 5) destroyed, it destroy all sprites (5) becouse they are the same, but there is still other (sprite 4) !
B
7
S
1
Posts: 53
Reputation: 545


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 2 guests