Initialization of app fails cause, I think, a Sprite Component list item number is 0, rather than 1 -> 4. Repeating this again using Do It works fine. I think it also has to do with the Sprite X Canvas field. The 4 Sprites are loaded to a Canvas, within a HA. What should I do? Thanks Charles
You're right! These other three procedures are the same as Sprite1. They are the same use the list. As you may guess, they all fail on the first initialization. I was just saving on Forum's space.
canvas is set to fill parent in width and height, so you need to give some time with a clock for the canvas to get its dimensions. You can improve automation/dynamism by using more lists for your positions and sizes.
TimAI2, Continuing with my Script app the 'Dragged' function causes an error. Label-1&2 give a correct result, but Label 3 indicates 7 items in the list rater than 8, the correct answer (8 items). Am I using the Component button incorrectly? Why? Thanks Charles
TimAI2,
I have four sprites, each using attached data, who interact with each other. 'Each sprite gets it's info with 'GetSpriteDetail', uses the data and then saves it with 'SaveSpriteDetail'.
Thanks, Charles
If you use the Any Sprite Dragged event, you have to take care to distinguish between which Sprites you want that event to handle and which Sprites you don't want that event to handle.
There are three ways to do this:
set a global variable to catch the TouchDown event of where the drag started, and save the Sprite component for help avoiding Sprite Cannibalism when other Sprites are blundered into by accident.
Keep lists of Sprites by function (Bird Sprites, Bullet Sprites, background Sprites) and check Is In List for the dragged component to decide how to handle that component.
Use the if notHandled variable of the event to test if other event blocks should be handling this event for this Sprite, and not this general purpose event.
ABG - Thank you for your input about "Distinguishing between Sprites". I'll check it out.
TimAI2 - Initiating these four sprites take two tries. I get a Runtime Error (it's looking for a Number?). After when I Dismiss the error and try it again, it works!
If you check the InitialClock proc you'll see I access the sprite first with a list and the second with Sprite2. What am I missing?
That really is confusing; certainly Buttons are not Sprites! My list is of Sprites, with each having 9, or sub-lists. I see this as a three step process. 1. A list variable makes a list with 4 sprites. 2. I initialize 4 sprites with 9 items, and then 3. I initialize the ImageSprite. What more must I do I do to "load up that list with items"? Thanks Charles
nb: Sorry about the Global, I'm in checkout.
ABG - Sorry, I'm afraid I'm not clever enough to work out your aia example. Sending an aia from my app would cause you too much time and effort to pursue.
The 4 Score buttons are used to score each sprite and initialize (on and off) for battle. Buttons are used to change score upon collision, initialize background color of Score Buttons, and I regular (not any) click buttons for score/sprite control. Hope this helps? Thanks, Charles