Author Topic: Most Efficient Way to Block Sprites  (Read 1886 times)

v6v

  • Clever
  • Fanatic
  • ***
  • Posts: 500
  • Has renamed his project to Galaxy!
    • View Profile
    • My Developer Page!
    • Email
Most Efficient Way to Block Sprites
« on: 2012-03-22, 05:00:41 PM »
I need an efficient way to block sprites according to TestCollisionRectangle. I figure there has to be an easy way to do this without multiple rules. The reason I ask is because sprites don't react well when drawn over each other in 3D space- and I've needed to do this for the longest time now. I know there's the LandOnPlatform rule.

Is there a one or 2 rule way to do this? Or a way that requires less than 5 lines of code? I don't want something extremely hefty to just do this.

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Most Efficient Way to Block Sprites
« Reply #1 on: 2012-03-22, 05:10:34 PM »
PushSprite if you want to put the rule into the sprite that blocks the other sprite.  ReactToPush if you want to put the rule into the sprite that gets blocked.
« Last Edit: 2012-03-22, 05:16:53 PM by bluemonkmn »