Spawing around the edges of the iDevice
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!
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
-
MotherHoose Posts: 2,456
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!MH
Answers