How to make sprite impenetratable

This forum is currently in read-only mode.
  • Hi,

    I'm newbee here.

    When I saw construct in www.freewarefiles.com I coudn't resist trying it out. Well I liked it very much. So I did the ghostchaser tutorial and with a couple of saves and crashes I finally made it work. Now I'm stuck with trying to make some kind of wall sprite in the ghost chaser project that the player can't walk through. I have found different other samples on this forum but I can't figure out how this work.

    Grateful for any help.

    Sincerely

    Andla

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hi, just add a sprite and under 'Attributes' in its properties, tick 'Solid'. Now the player can't walk through it <img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" />

  • Thanks Ashley.

    I have done that now and it works for the player (nice! <img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /> but a new problem occured. The monsters just floats through. It's not strange for beeing a ghost but if they where for example orcs, then huh.

    Another thing. I tried the kickit.cap sample and I couldn't find that the solid checkbox was checked.

    BTW I'm thinking of doing a youtube tutorial of the ghostchase sample if it is ok with you?

  • Yeah sure youtube whatever you want. The monsters use a bullet movement which doesn't respond to solids, instead, you can use an event like this:

    Monster collides with Wall: set Monster angle to Monster.Angle + 180

    This just means whenever a ghost touches the wall, it will flip round to the other direction.

    I don't think kickit.cap comes with Construct so I can't remember how it does collisions, but there are lots of different ways of making collisions work. You can use the Physics movement, events like above to handle collisions, the Solid attribute, etc.

  • Thanks for your help.

    I found the kickit.cap sample here:

    http://www.scirra.com/phpBB2/viewtopic. ... ht=physics

    I have remove everything in the event sheet editor. The ground object are still solid.

  • Yes, as I thought: the colliding objects have the Physics movement. Objects with the Physics movement automatically collide with each other.

  • Ok. Thanks for all help Ashley. <img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" />

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)