How to make sprite impenetratable

For questions about using Classic.

Post » Sun Dec 16, 2007 12:27 pm

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
B
2
S
1
G
5
Posts: 79
Reputation: 1,558

Post » Sun Dec 16, 2007 5:08 pm

Hi, just add a sprite and under 'Attributes' in its properties, tick 'Solid'. Now the player can't walk through it :)
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Sun Dec 16, 2007 5:26 pm

Thanks Ashley.
I have done that now and it works for the player (nice! :) 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?
B
2
S
1
G
5
Posts: 79
Reputation: 1,558

Post » Sun Dec 16, 2007 5:34 pm

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.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Sun Dec 16, 2007 6:03 pm

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.
B
2
S
1
G
5
Posts: 79
Reputation: 1,558

Post » Sun Dec 16, 2007 7:13 pm

Yes, as I thought: the colliding objects have the Physics movement. Objects with the Physics movement automatically collide with each other.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Sun Dec 16, 2007 7:41 pm

Ok. Thanks for all help Ashley. :)
B
2
S
1
G
5
Posts: 79
Reputation: 1,558


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests