Game Development tilemap – How am i able to get a price from object in tmx file in Cocos2d x 3.x? Team FunTrove - August 31, 2022 0 [ad_1] tilemap – How am i able to get a price from object in tmx file in Cocos2d x 3.x? – Game Development Stack Exchange Stack Exchange Network Stack Exchange community consists of 182 Q&A communities together with Stack Overflow, the biggest, most trusted on-line neighborhood for builders to be taught, share their data, and construct their careers. Visit Stack Exchange Log in Sign up Game Development Stack Exchange is a query and reply website for skilled and unbiased recreation builders. It solely takes a minute to enroll. Sign as much as be part of this neighborhood Anybody can ask a query Anybody can reply The greatest solutions are voted up and rise to the highest Asked 7 years, 6 months in the past Viewed 699 instances $begingroup$ I wish to set my sprite in x coordinate based mostly on an object in TMX map file, that is my code: tileMap = cocos2d::TMXTiledMap::create("floor.tmx"); floor = tileMap->layerNamed("floor"); this->addChild(tileMap); TMXObjectGroup *objects = tileMap->objectGroupNamed("objects"); Dictionary *signal = (Dictionary*)objects->objectNamed("signal"); How am i able to get a price of object in tmx file in Cocos2d x ? requested Feb 27, 2015 at 22:52 $endgroup$ $begingroup$ ValueMap signal = objects->getObject("signal"); float x = signal["x"].asFloat(); float y = signal["y"].asFloat(); std::string nameAlias = signal["name_alias"].asString(); In cocos2d v.3.8, objectNamed(“title”) will return ValueMap kind that accommodates Value kind. You can see in CCValue.h for extra particulars. answered Feb 20, 2016 at 4:38 $endgroup$ You should log in to reply this query. Not the reply you are in search of? Browse different questions tagged cocos2d-iphone tilemap cocos2d-x . default Your privateness By clicking “Accept all cookies”, you agree Stack Exchange can retailer cookies in your system and disclose data in accordance with our Cookie Policy. Accept all cookies Customize settings [ad_2] LEAVE A REPLY Cancel reply Please enter your comment! Please enter your name here You have entered an incorrect email address! Please enter your email address here Save my name, email, and website in this browser for the next time I comment.