1
General / Re: String to movement help
« on: August 01, 2014, 08:28:35 am »
Sorry I must not have made my original post clear enough.
I understand how movement works, I've successfully made player movement work with mouse click and arrow keys, but I'm not sure how to go about making the player move by checking route.
I can't do a...
... within the switch loop within the for loop, as my program will freeze.
I am wondering how I would go about writing and calling a function to make my player move with the specific route in mind.
I understand how movement works, I've successfully made player movement work with mouse click and arrow keys, but I'm not sure how to go about making the player move by checking route.
I can't do a...
while(rect.pos != targetPos)
{
rect.move(0.01*deltaTime.asMilliseconds(), 0);
}
{
rect.move(0.01*deltaTime.asMilliseconds(), 0);
}
... within the switch loop within the for loop, as my program will freeze.
I am wondering how I would go about writing and calling a function to make my player move with the specific route in mind.