Determining size of collision, and grouping objects?

saxajarsaxajar Member Posts: 4
edited November -1 in Working with GS (Mac)
Two questions

First, is there a way to determine the size of the collion box of an entity, regardless of it's sprite size? Currently the only way I can see to do collisions is basically the size of the object, even if there is blank space around the sprite.

Second, is there a way to group sprites easily, if you want to have a layered sprite with different parts, but have it controlled as a single entity?

Thanks for the help.

Comments

  • FoleyFoley Member Posts: 37
    I've been working on grouping actors as well.

    It can be done for a single actor by creating some global variables, but that method breaks down if you spawn multiples of that actor (i.e. duplicate multi-sprite enemies).

    anyone else have another method they are using?
  • AuricAuric Member Posts: 35
    There is no true grouping concept yet. That's *very* high on my personal wish list.
  • AuricAuric Member Posts: 35
    Not to mention having object(s) instances named so they can be uniquely referenced.
  • saxajarsaxajar Member Posts: 4
    What about determining the size of your collision box/circle? Currently it just fits the size of your "actor", so basically if your sprite doesn't go to the edges of your image, collision looks very off. But you can't always have your sprites work that way so...
  • firemaplegamesfiremaplegames Member Posts: 3,211
    You can have an invisible "collision" actor and constrain the position of another actor of any size to the "collision" object.

    create 2 game attributes called PlayerX and PlayerY.
    Within the collision object, constrain PlayerX and PlayerY to the collision actor's X and Y.

    Within the sprite, constrain its X and Y to PlayerX and PlayerY.

    Your controls would control the invisible actor, not the sprite.

    By doing this, you can have the collision boundaries be larger or smaller than the sprite.
    I have done this and it works well.

    Hope this helps!
  • TwistedMechTwistedMech Member Posts: 408
    It would be nice if you could see the object name when mouse is over item. example, several display text boxes on screen which are attached to score vars. the only way to know what there are seems to be by double clicking and looking at actor details.

    also, could really do with a way to to rename the duplicated actor in scene and then be able to use a rule to check the other actors variables.
Sign In or Register to comment.