my idea is that i need to put in a wait command before they can skip to the next lane to prevent bugging out.
This is not making any sense. Put a wait where? What is wrong with the Wait action?
One approach to do what you are after would be to give the units insane speed between waypoints. Since they only get ordered to the next waypoint after reaching the current one you can be sure they will not warp past it skipping legitimate towers.
To implement this you identify journeys between waypoints to be skipped (eg lane with no towers). When they start that hop of the journey you raise the unit's speed by a factor of 100 odd allowing them to make the journey between the waypoints in a matter of frames. When they arrive at the waypoint you reset their speed back to normal if the next journey is not to be skipped (eg lane with towers).
To prevent units becoming stuck between journeys you periodically check if they are still on-route to the next waypoint. This should be done in a staggered way to prevent excessive resource use in the case of there being hundreds of units.
my idea is that i need to put in a wait command before they can skip to the next lane to prevent bugging out.
This is not making any sense. Put a wait where? What is wrong with the Wait action?
One approach to do what you are after would be to give the units insane speed between waypoints. Since they only get ordered to the next waypoint after reaching the current one you can be sure they will not warp past it skipping legitimate towers.
To implement this you identify journeys between waypoints to be skipped (eg lane with no towers). When they start that hop of the journey you raise the unit's speed by a factor of 100 odd allowing them to make the journey between the waypoints in a matter of frames. When they arrive at the waypoint you reset their speed back to normal if the next journey is not to be skipped (eg lane with towers).
To prevent units becoming stuck between journeys you periodically check if they are still on-route to the next waypoint. This should be done in a staggered way to prevent excessive resource use in the case of there being hundreds of units.
This. Just let them always walk the full way and give them a little speed boost.
I suppose you have two regions per lane "enter" and "exit". If a unit enters "enter" and this player is !"playing" give the unit a speed buff. If the player is playing, remove the speed buff.
Be careful thou with too much speed boost. I have experienced really strange things with unit control if a unit moves at abnormal speeds, but since you are doing line tower wars and there is no towers to block the unit in that lane, it wouldn't need a lot of speed boosting anyway.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
hey there !
does any1 know how to make a wait command?
example:
im making some kind of a WC3 based funmap called LineTowerWars.
so, when a lane is not used by a player, the units have to skip the lane and move to the next one.
that works good so far, BUT:
when im testing it, the units skip so fast the lanes that some of them just bug out....
my idea is that i need to put in a wait command before they can skip to the next lane to prevent bugging out.
i would add a code but its in german :/
hope some of u remember LTW and know what im talking about ^^
thanks!
This is not making any sense. Put a wait where? What is wrong with the Wait action?
One approach to do what you are after would be to give the units insane speed between waypoints. Since they only get ordered to the next waypoint after reaching the current one you can be sure they will not warp past it skipping legitimate towers.
To implement this you identify journeys between waypoints to be skipped (eg lane with no towers). When they start that hop of the journey you raise the unit's speed by a factor of 100 odd allowing them to make the journey between the waypoints in a matter of frames. When they arrive at the waypoint you reset their speed back to normal if the next journey is not to be skipped (eg lane with towers).
To prevent units becoming stuck between journeys you periodically check if they are still on-route to the next waypoint. This should be done in a staggered way to prevent excessive resource use in the case of there being hundreds of units.
This. Just let them always walk the full way and give them a little speed boost.
I suppose you have two regions per lane "enter" and "exit". If a unit enters "enter" and this player is !"playing" give the unit a speed buff. If the player is playing, remove the speed buff.
Be careful thou with too much speed boost. I have experienced really strange things with unit control if a unit moves at abnormal speeds, but since you are doing line tower wars and there is no towers to block the unit in that lane, it wouldn't need a lot of speed boosting anyway.