How do I Stop the player from leaving the screen

Just started using Construct 2? Post your questions here

Post » Fri Dec 23, 2016 12:37 pm

Do the collisions on the bounding box ? With correct polygons.
The the bounding box is what moves the whole system anywayz.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Fri Dec 23, 2016 6:05 pm

99Instances2Go wrote:Do the collisions on the bounding box ? With correct polygons.
The the bounding box is what moves the whole system anywayz.



If I do that then it would mean that moving the player would be limited to one area of the box as the collision is where the dragging is based on is it not? . So this player is a "brush" with a handle, brush head and bristles, I only want the Bristle to interact with the enemy so making the collision on based in that area would mean that the dragging would only work there would it not ?

Thanks

TimCS
Regards

TimCS
B
23
S
8
Posts: 132
Reputation: 1,921

Post » Fri Dec 23, 2016 6:15 pm

Thats true, the collission polygons of the box keeps things inside the layout. That was a very bad suggestion.

I dont know if this 'collission' is supposed the act a 'physics collision', i suppose not.
Then i dont see a problem.
Give the player parts an identification instance variable, say 'id'.

Player instance variable 'id' = bristle.
On (player) overlapping (enemy)
............ do stuff
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Fri Dec 23, 2016 10:33 pm

99Instances2Go wrote:Thats true, the collission polygons of the box keeps things inside the layout. That was a very bad suggestion.

I dont know if this 'collission' is supposed the act a 'physics collision', i suppose not.
Then i dont see a problem.
Give the player parts an identification instance variable, say 'id'.

Player instance variable 'id' = bristle.
On (player) overlapping (enemy)
............ do stuff


Not sure if the overlapping logic will work correctly for this game as the idea is to create a brushing effect ,. as if the player object is just overlapping the enemy object then the "brushing effect" is not really going to happen as well as I have tried to use it so can this method you have mentioned work with on collision ?.

At the moment I am using the on collision statement with the bristles on the enemy .

Thanks TimCS
Regards

TimCS
B
23
S
8
Posts: 132
Reputation: 1,921

Post » Fri Dec 23, 2016 11:42 pm

Lets converge.

If this works:

https://www.dropbox.com/s/qrtegi0qmx6a4 ... .capx?dl=0

What do i miss ?
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Sat Dec 24, 2016 4:15 pm

99Instances2Go wrote:Lets converge.

If this works:

https://www.dropbox.com/s/qrtegi0qmx6a4 ... .capx?dl=0

What do i miss ?




This could work I presume the playerbox does not have to had a border around it ? will have to try this is out with the type of brush I am using with the game. Again thanks a lot 99Instances2go and have a good Christmas.

Regards

TimCS
Regards

TimCS
B
23
S
8
Posts: 132
Reputation: 1,921

Previous

Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 6 guests