apologies for the double, you may delete if possible.. On Sunday, November 29, 2015 at 8:12:15 AM UTC+2, [email protected] wrote: > > Greetings, > > I am trying to move a player to every position in a list of positions. my > list looks like this: > > [(288, 384), (320, 384), (352, 384), (352, 352), (352, 320), (384, 320), ( > 416, 320), (416, 288), (416, 256), (384, 256), (352, 256), (320, 256), ( > 288, 256), (256, 256), (224, 256), (224, 224), (192, 224), (160, 224), ( > 160, 192), (128, 192), (128, 160)] > > it determines a path using the a* algorithm on a tilemap,and then I > convert the tilemap coordinates to pixel coordinates. > I now want to move to player to every position on that list in a sequence. > > I seem to recall other cocos2d platforms allow you to use a CCSequence > which contains actions to perform in a sequence. however, loscocos doesn't > seem to have a CCSequence object, but only the CallFunc. Can I use the > CallFunc to MoveTo every position of a list? > I tried a for loop, but it did not work. any ideas? > > I am including my small demo so you can see the context of the issue if > you wish. the astar algorithm is in a separate file. > btw, I did not write the astar algorithm. I found a pygame one with a > great separation of logic without a license from here > <https://code.google.com/p/find-a-way/>. > > My code is located at "testai.py" while the algorithm is in "solver.py" > The point of my code is to move the player to wherever the user clicks > while avoiding obstacles. > >
-- You received this message because you are subscribed to the Google Groups "cocos2d discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/cocos-discuss. For more options, visit https://groups.google.com/d/optout.
