How to drag 9 spawned actors independently - EXTRA CHALLENGING
Hey guys, thanks in advance.
In my iPad game on one scene, I spawn an actor (bees) multiple times so that there can literally be 20 bees flying across the screen at once. I want to allow the user to drag up to 10 bees independently using the touchpoint data. I'm struggling to figure out how to do this correctly. Are there any examples of this or templates that have this that I can purchase? Thanks for your help guys, really appreciate it.
Totally stumped
In my iPad game on one scene, I spawn an actor (bees) multiple times so that there can literally be 20 bees flying across the screen at once. I want to allow the user to drag up to 10 bees independently using the touchpoint data. I'm struggling to figure out how to do this correctly. Are there any examples of this or templates that have this that I can purchase? Thanks for your help guys, really appreciate it.
Totally stumped
Comments
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
- create game level attributes for each independent bee (bee1, bee2, etc.)
- create independent bee actors
- on bee1, if touch1x & touch1y land within actor, change bee1 game level actor index to 1 and constrain position to touch1x & touch1y.....etc.
- when bee1 is released, reset game level attribute to 0
This works well although i'm concerned that creating these extra actors and game level attributes will slow everything down but i couldn't figure out another way....
- when touch is pressed and self.touch =0
- if touch1x & touch1y fall w/ x&y position of actor, use drag rules according to touch1x & 1y and set self.touch to 1
- when released, set self.touch to 0
- do this for all 10 touch points so that for example if touch8 is pressing actor, those are the touch points dragging it....
Did you get this working? Did you use a single actor using a self attribute or did you make 10 actors? I would gladly pay for a generic working template that allowed an actor to spawn multiple actors that could then be dragged by multiple simultaneous touches. Heck, I would even love to see a template that allowed two objects to be drug around separately.
thanks...
all ten fingers at work?
@GreenHavenGames … all touches, at any place on the screen, register.
and, as we can't get more than one mouse click to register … this is confusing
make a newProject … one Actor …
set its Alpha to O
make as large or larger than screen display
Rule: when
Event: touch is pressed
--displayText: game.Touches.Touch 1.X .."\n".. game.Touches.Touch 1.Y
Preview your work in GS Viewer and what happen
@Tynan … you always get me …
@};- MH
Good luck!