How do I mouseover over whole sprite with reduced polygons?

Get help using Construct 2

Post » Sun Jan 01, 2017 9:48 pm

Hi,

i am currently trying to create a graphic adventure and for the player character to be able to walk behind objects i had to reduce the area of collision polygons to at least the lower 25%.

But now it's also necessary to move the mouse cursor to these 25% to display the object information (for example "Look at chair"), which could confuse most players.

My question is: How can i use the whole sprite for a mouseover without increasing the collision area?

Thanks in advance for the help!
B
4
S
1
Posts: 8
Reputation: 366

Post » Sun Jan 01, 2017 10:10 pm

Make an invisible sprite at whatever size that you need and pin the player character to it.
B
61
S
20
G
56
Posts: 1,077
Reputation: 35,991

Post » Sun Jan 01, 2017 11:30 pm

Thanks, but i mean not the player but every object in the game the player needs to be able to get behind AND interact with.

Like the chair, the collision polygons only make up the lower 25% of that sprite, so the info mouseover (which just shows "Chair", "Table", etc.) doesn't work with the whole sprite.

So i have to make an invisible sprite for every of those objects?
B
4
S
1
Posts: 8
Reputation: 366

Post » Mon Jan 02, 2017 1:34 am

That's what I usually do. I use invisible 2x2 tiled backgrounds scaled up though.
B
61
S
20
G
56
Posts: 1,077
Reputation: 35,991

Post » Mon Jan 02, 2017 1:49 am

You could do it the other way around just to make it easier. Make normal collision polygons for all objects - so you can interact with them normally, like hover mouse over them, etc.
But for proper collisions with players you could use separate object. like Burvey suggested. Make a 2x2 sprite or tiled background and simply copy it over and placed on the layout making kind of a "level collision map".

Also if you want to make player go behind or in front of the objects you can do that with just a Origin or Image point of the sprite:
Player.Y > Sprite.Y = player is in front
Player.Y < Sprite.Y = player is behind

....but it all depends on what kind of style your adventure game have.
ImageImageImageImage
B
158
S
66
G
43
Posts: 2,603
Reputation: 35,868


Return to How do I....?

Who is online

Users browsing this forum: dop2000, KefiRocK, matriax, Syazanie Amirin and 11 guests