controlling where a sprite affects another sprite

Get help using Construct 2

Post » Wed Oct 30, 2013 1:46 am

Right now if your on the platform(branches)
and you press Down Arrow, he will flip upside
down. While Upside down if you press Down and attack
the squirrel will drop down....

this all works, which is great....but its based
on collision....when the squirrel collides with
the branch..var=1...when var=1 make gravity 0,flipsprite
...
if you look at lines 116-124
http://www.dwbailey.com/images/climbingissue.capx

The issue that the way I have it set up..as soon as I collide with the
branch from underneath and press down it will start doing some wierd stuff....I am not sure how to have the 1 added to the var on when I land ontop of the sprite? even if it has a jump through behavior..
B
9
S
2
Posts: 272
Reputation: 1,632

Post » Wed Oct 30, 2013 12:29 pm

Will this work?

On collision
player.Y < branch.y
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 4:47 pm

now will that affect each ones individual space...right now I have these branches everywhere... is this based off the individual points on the sprites...?
B
9
S
2
Posts: 272
Reputation: 1,632

Post » Wed Oct 30, 2013 5:18 pm

got it to work..thanks your a life savor.

<a href="http://s93.photobucket.com/user/spawn85027/media/lifesavor_zps3fc1b392.png.html" target="_blank"><img src="http://i93.photobucket.com/albums/l74/spawn85027/lifesavor_zps3fc1b392.png" border="0" alt=" photo lifesavor_zps3fc1b392.png"/></a>
B
9
S
2
Posts: 272
Reputation: 1,632

Post » Wed Oct 30, 2013 5:18 pm

http://i93.photobucket.com/albums/l74/spawn85027/lifesavor_zps3fc1b392.png
B
9
S
2
Posts: 272
Reputation: 1,632

Post » Wed Oct 30, 2013 5:19 pm

B
9
S
2
Posts: 272
Reputation: 1,632

Post » Wed Oct 30, 2013 5:39 pm

Hey littlestain, so I got it to work but not sure why it works.
Is this based on the height of the sprite in pixels.. my player is 32 by 32....and my branches is 32 by 32...i dont get what Y point this is all going by...is it any y point on the sprite? well not sure why it works...if anyone can clarify line 27...i just want to know why something works.
B
9
S
2
Posts: 272
Reputation: 1,632

Post » Wed Oct 30, 2013 5:53 pm

http://www.dwbailey.com/images/squirrelnutsUp/

press down to hang....down and fire to drop down from hanging
B
9
S
2
Posts: 272
Reputation: 1,632


Return to How do I....?

Who is online

Users browsing this forum: Google [Bot], Lordshiva1948, plinkie, sublimate and 9 guests