Scrolling Game Development Kit Forum

SGDK Version 1 => Help/FAQ => Topic started by: sam on 2006-04-10, 04:27:12 PM

Title: Solid Sprite
Post by: sam on 2006-04-10, 04:27:12 PM
Hey. How can I make it so that when the player comes in contact with another sprite the other sprite acts like its a solid tile?
I've tried many things.
Using "B Repels A" doesn't work either. When the player touches the tile it bounces off a bit.
I can't have this happen because: It's like a Zelda game. I'm having grass that the player can burn with a lighter. When the player presses Ctrl it creates a sprite (scripting wizard) which is a small flame. So, when the player bounces off the grass it faces another way (which causes the flame to go that way).
Title: Re: Solid Sprite
Post by: durnurd on 2006-04-10, 08:13:50 PM
Well, if A is the fire, and B is the grass, and you want A to stop when it comes in contact with B, is there any reason you can't use "A Stops"?
Title: Re: Solid Sprite
Post by: bluemonkmn on 2006-04-11, 05:26:03 AM
Or it might be possible to use tiles.  The tiles could have an interaction defined that makes them disappear when the player owns a certain invisible inventory item that indicates that he's using the lighter.
Title: Re: Solid Sprite
Post by: sam on 2006-04-11, 08:58:02 AM
Quote
Well, if A is the fire, and B is the grass, and you want A to stop when it comes in contact with B, is there any reason you can't use "A Stops"?
A is the character.
B i the grass.
When the player comes in contact with the grass the player bounces back a bit and faces the other way. So the player can't stand right up next to the grass and use the lighter because he would be facing the other way.

Title: Re: Solid Sprite
Post by: durnurd on 2006-04-11, 09:05:07 AM
I see.  Well, we could change my statement to: Well, if A is the player, and B is the grass, and you want A to stop when it comes in contact with B, is there any reason you can't use "A Stops"?

But I just tested that out, and it seems the "A Stops" doesn't work very well as a Stopping a Sprite method.  I would suggest almost that it be fixed in another release of SGDK but it would remove backwards compatibility if anybody were using it to do what it does now (which is basically imobilize the sprite being stopped).  Especially if you land on top of a sprite, rather than stopping, you slowly sink into it.  If you walk into the sprite, you go a few pixels in, then are imobilized and can't get out.  Hmm....in that case, I would go with BlueMonk's suggestion.
Title: Re: Solid Sprite
Post by: sam on 2006-04-11, 03:32:54 PM
alright, I'll try BlueMonks method.
Title: Re: Solid Sprite
Post by: bluemonkmn on 2006-04-11, 09:28:01 PM
I would suggest almost that it be fixed in another release of SGDK but it would remove backwards compatibility if anybody were using it to do what it does now (which is basically imobilize the sprite being stopped).