[email protected] wrote: """ I've made a map using cocograph, and I've loaded it into my program. I've set a tile with the property named '1' and set it to true. However, when I run through all the cells in the map and print out their properties, none of those cells give a non-empty list.
[snipped code] The map : <resource><requires file="Cocograph-0.2.0/maps/dungeon/new_tiles.xml" / > <rectmap id="2" origin="0,0,0" tile_size="64x64"><property name="1" type="bool" value="True" /> <property name="" type="unicode" value="" /> <column><cell tile="beach-g-tr" /> <cell tile="beach-g-tr" /> <cell tile="beach-g-tr" /> <cell tile="beach-g-tr" /> <cell tile="beach-g-tr" /> <cell tile="beach-g-tr" /> <cell tile="beach-g-tr" /> <cell tile="beach-g-tr" /> <cell tile="beach-g-tr" /> <cell tile="beach-g-tr" /> <cell tile="beach-g-tr" /> [snipped lot of lines] """ Look at the rectmap line, you are setting property s for the rectmap object, not for cell objects. For cell objects you must have something like <cell tile="beach-g-tr><property name="1" type="bool" value="True"></cell> (untested, the code expects certain directory tree) Additional suggestion: use clear names for property s, like 'electrified' , 'trap' or whatever. '1' will be hard to work. And, the gmail web interface dont let me edit the reply directly, maybe size or maybe the editor control fooled by the xml markup -- claudio -- You received this message because you are subscribed to the Google Groups "cocos2d discuss" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/cocos-discuss?hl=en.
