Author Topic: Solid Sprite  (Read 6166 times)

sam

  • Fanatic
  • ***
  • Posts: 303
  • This statement is false.
    • MSN Messenger - samlancashire@hotmail.com
    • View Profile
    • samlancashire.com
    • Email
Solid Sprite
« 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).

durnurd

  • Lead Lemming
  • Expert
  • Fanatic
  • *****
  • Posts: 1234
  • Games completed so far: 0
    • MSN Messenger - durnurd@hotmail.com
    • View Profile
    • Find My Ed
Re: Solid Sprite
« Reply #1 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"?
Edward Dassmesser

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Solid Sprite
« Reply #2 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.

sam

  • Fanatic
  • ***
  • Posts: 303
  • This statement is false.
    • MSN Messenger - samlancashire@hotmail.com
    • View Profile
    • samlancashire.com
    • Email
Re: Solid Sprite
« Reply #3 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.


durnurd

  • Lead Lemming
  • Expert
  • Fanatic
  • *****
  • Posts: 1234
  • Games completed so far: 0
    • MSN Messenger - durnurd@hotmail.com
    • View Profile
    • Find My Ed
Re: Solid Sprite
« Reply #4 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.
Edward Dassmesser

sam

  • Fanatic
  • ***
  • Posts: 303
  • This statement is false.
    • MSN Messenger - samlancashire@hotmail.com
    • View Profile
    • samlancashire.com
    • Email
Re: Solid Sprite
« Reply #5 on: 2006-04-11, 03:32:54 PM »
alright, I'll try BlueMonks method.

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Solid Sprite
« Reply #6 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).