Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Spawing around the edges of the iDevice

rommaromma Posts: 114Member
edited March 2012 in Working with GS (Mac)
Hi guys

I'm working on my first game, and one of the core values of it is that I have random actors "poping out" around the entire border of the iDevice. I can schieve this easily by having 4 actors of the same "graphic" each for top, left, right and bottom, but adding more characters will make things work slugish, is there a way with just 1 character?

The characters have a behavior of Interpolate the Y position so when I spawn them they "animate in"

Hope I made myself clear, any help would be appreciated!

Best Answer

  • MotherHooseMotherHoose Posts: 2,456Member
    Accepted Answer
    for 4 actorInstances with specified 4 location of screen left; right; top; bottom
    recycle should work better than spawn

    just name the instances appropriately for location

    Rule: when:
    Attribute: self.Name = left
    --changeAttribute: self.Image To:
    -- or changeAttribute: self.Rotation To:
    --Rule: when self.Name=right

    good you are using tables!

    image MH


  • calvin9403calvin9403 Posts: 3,190Member
    Well, you can go inside the edit scene and unlock the actors there, then you can change them(ex:put different behaviors in each)
  • rommaromma Posts: 114Member
    I did it using different X and Y coords in a table then cycling thru the cells for values, in th elong run it was going to be better.
This discussion has been closed.