Spawing around the edges of the iDevice

rommaromma Member Posts: 114
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,456
    Accepted Answer
    for 4 actorInstances with specified 4 location of screen left; right; top; bottom
    recycle should work better than spawn

    http://gshelper.com/?p=416

    just name the instances appropriately for location


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

    good you are using tables!

    image MH

Answers

  • calvin9403calvin9403 Member Posts: 3,186
    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 Member Posts: 114
    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.
Sign In or Register to comment.