how to make that actor won't pass through other actor?

Just started using Construct 2? Post your questions here

Post » Sun Jul 05, 2015 11:16 pm

hi everyone. if i have 2 sprites: player and wall how to make that the player won't pass through the wall?

i added to both of the sprites solid behevior.

this is how i made the movement of the player: condition: keyboard , key is down , D

action: player , set x , player.X+2
B
8
S
3
Posts: 100
Reputation: 1,023

Post » Mon Jul 06, 2015 8:48 am

Just use actions for movement. Do not use player.X+2 (for instance use "simulate platform right")

Don't make player solid. It shouldn't be.

For player add behaviour "platform".


There is also an example included in C2. Press "New" and scroll down to platform example. It already has everything set up.
B
7
S
2
Posts: 68
Reputation: 645

Post » Mon Jul 06, 2015 12:27 pm

tavi wrote:Just use actions for movement. Do not use player.X+2 (for instance use "simulate platform right")

Don't make player solid. It shouldn't be.

For player add behaviour "platform".


There is also an example included in C2. Press "New" and scroll down to platform example. It already has everything set up.


thanks for the help . but i think i dident explain myself good. i want to make top down shooter (8 direction movement, gameplay like enter the gungeon ) but the movement in 8 direction behavior isnt good. there is a way to slove my problem without use platforum or 8 directicon behavours?

this is how i did all the movement:

condition: keyboard , key is down , D action: player , set x , player.X+2

condition: keyboard , key is down , A action: player , set x , player.X-2

condition: keyboard , key is down , S action: player , set x , player.Y+2

condition: keyboard , key is down , W action: player , set x , player.Y-2
B
8
S
3
Posts: 100
Reputation: 1,023

Post » Mon Jul 06, 2015 1:46 pm

Whats wrong with 8direction?
If you want to make it yourself, with collision check... that will be a huge sheet! To help you would be a huge amount of time.
8direction has everything in it. I think you dont know whats all possible with 8direction, is that possible?
Sorry for my bad english, but I really do my best! And use and check with Google Translator.
B
10
S
4
G
1
Posts: 158
Reputation: 1,303

Post » Mon Jul 06, 2015 10:23 pm

thanks for all the peapole who helped me. the problem sloved :)
B
8
S
3
Posts: 100
Reputation: 1,023


Return to Beginner's Questions

Who is online

Users browsing this forum: Yahoo [Bot] and 0 guests