so i have answered my one question about the command, that location was removed , and ingrid just walks back and forth between 2 locations not 3 anymore
Code: Select all
MovementLoopAddLocation(ingrid, -2.48, -1.78, -9.14, 1, 0 , "",1)--location1 get removed
MovementLoopAddLocation(ingrid, -2.07, 1.21, -14.71, 1, 0 , "")--location2
MovementLoopAddLocation(ingrid, 1.80, 1.21, -13.71, 1, 0 , "")--location3
but
here is the orderby location
1,2,3,1,2,3,2,3,2,3,2,3
when setting the second location to get removed
Code: Select all
MovementLoopAddLocation(ingrid, -2.48, -1.78, -9.14, 1, 0 , "",1)--location1 get removed
MovementLoopAddLocation(ingrid, -2.07, 1.21, -14.71, 1, 0 , "",1)--location2 get removed
MovementLoopAddLocation(ingrid, 1.80, 1.21, -13.71, 1, 0 , "")--location3
the order is
1,2,3 and ingrid stops where she should, but there is a pause between stops
here is where i added the remove code, is there a faster way or more appropriate place to add( in ProcessMovement
Code: Select all
else
AddRunningLocation(data->x, data->y, data->z, data->speed);
// reset this timer to 0 now that we are moving again
boolean doiremove = data->remove;
if (doiremove == 1) {// added by ememjr to remove a location
movement_loop.erase(movement_loop.begin()+movement_index);
}
movement_start_time = 0;
}