Image Instance in MAPS/LISTS -HELP

megagewinnspiel

  • Posts: 396
Hey guys,

I am currently working on an ingame item shop and instead of creating 93 separate image instance (which would be absolutely insane) I chose to use the really useful MAP attribute. I simply chose the key and added the instance as the value.
While testing something stops me from moving on:

As you can see, when the mouse is released upon an instance within the map "KARTEN ORDNER" it prints out "!!!!!".

Works fine on flash but it does not work at all on windows/mobile....why?  I don't get an error or anything, it just does not get that the mouse clicked on the image instance... How can I fix this?

Thanks alot!

« Last Edit: March 08, 2016, 03:55:42 am by megagewinnspiel »

megagewinnspiel

  • Posts: 396
Alright NOW I am getting really confused here....
I tried to find a workaround using Game Attributes as a medium for the Image Instances.....why the hell does it still not work? There is not even a Map in use here and the List only functions as a List of names.



The Image Instance ARE THERE (as a GA and in the MAP) since I can work with them (remove, scale, move etc.) so why is the position not readable on windows / mobile?

megagewinnspiel

  • Posts: 396
When I print out the coordinates or the width/height on windows it always says "0". As if there are no Instances but it still works when I try to remove or scale it.

ceosol

  • *
  • Posts: 2278
What happens in flash, stays in flash :)

There are many differences between flash commands and PC/Mac/Linux/ios/android. You have to do your testing on whatever platform you want to publish on. Normal commands, such as movement, work across all platforms. Specialized mechanics do not - at least in my experience. I had to completely redo Daring Adventure's mechanics when I was switching from flash to other platforms.

CmdrWhitey13

  • Posts: 504
Just a little push here. The "key" is actually a string variable and does not correspond to a physical key. Good idea for a list or map concept.  But it might be better for key "item name" and value of image may help you out.

ceosol

  • *
  • Posts: 2278
To make lists inside of maps, I use a unique quantifier for each key. Say you have 'aa' and 'aaa' at the beginning and end of your list in the first key. Then ab and aab at the beginning/end of your 2nd key's list. You could then extract your keys into a single text attribute and separate the lists by doing "part of the text from index of aa to index of aaa"

yoplalala

  • *
  • Posts: 1632
http://community.stencyl.com/index.php?issue=118.0

quote
(and for now, you can work around this by simply pulling the item from the loop into a temporary image instance attribute before doing anything with it)
quote


try creating an attribute imgInst and setting it to the item before using it.