Unit Movement
Moderator: Moderators
Unit Movement
Hey!
I have been looking through the avaliable gadget and widget on unit movement and stuff.
However I not quite if it is possible to the following:
1. Say I have 5 soliders
2. When I give a move command on 1 solider, the rest of the solider will follow. Same with all the other commands, attack, guard etc etc.
Have anyone done or know any ways that this can be possible?
Another question:
If we have textured road in the map, will we be able to set units to move only on those roads?
Thanks!
I have been looking through the avaliable gadget and widget on unit movement and stuff.
However I not quite if it is possible to the following:
1. Say I have 5 soliders
2. When I give a move command on 1 solider, the rest of the solider will follow. Same with all the other commands, attack, guard etc etc.
Have anyone done or know any ways that this can be possible?
Another question:
If we have textured road in the map, will we be able to set units to move only on those roads?
Thanks!
-
- Moderator
- Posts: 2464
- Joined: 12 Oct 2007, 09:24
Re: Unit Movement
Very possible. This can be done a few ways depending on exactly what you want.1. Say I have 5 soliders
2. When I give a move command on 1 solider, the rest of the solider will follow. Same with all the other commands, attack, guard etc etc.
Set where? Do you want the players to be able to tell units to stick to the roads or do you want to prevent all off road movement?If we have textured road in the map, will we be able to set units to move only on those roads?
Preventing all movement is simple, use typemaps.
Toggling road using is harder, you could replace long move orders with ones that are going to follow the road. Maybe there is some solution to do with unit swapping and typemaps as well.
Re: Unit Movement
Simply by using a typemap to make road use substantially faster makes the pathfinder *heavily* encourage road use. See Beherith's older FFA maps to watch units swarm along the roadways.
Re: Unit Movement
*sighs* if it was only that simple "use typemaps"
Unit gets pushed into typemap: stuck
Unit slows down too slowly, goes into typemap: stuck
Typemaps are filled with all sorts of issues like this when you explore them
Unit gets pushed into typemap: stuck
Unit slows down too slowly, goes into typemap: stuck
Typemaps are filled with all sorts of issues like this when you explore them
Re: Unit Movement
Google_Frog mind sharing some ways I could explore on squad commands?
I am currently able to spawn my units in squad.
So for e.g. if I have 5 solider, the 5 solider will spawn together at game start.
Do I need to script a widget or gadget so they will move together and support each other in the battle.
It seem typemaps have it own set of problems.
Smoth care to elaborate more about the units into type map and gettting stuck?
Thanks!
I am currently able to spawn my units in squad.
So for e.g. if I have 5 solider, the 5 solider will spawn together at game start.
Do I need to script a widget or gadget so they will move together and support each other in the battle.
It seem typemaps have it own set of problems.
Smoth care to elaborate more about the units into type map and gettting stuck?
Thanks!
Re: Unit Movement
Which is why a hard "can't move on terrain X" typemap is a bad idea without some Lua to force the unit back onto the road if they end up off it.smoth wrote:*sighs* if it was only that simple "use typemaps"
Unit gets pushed into typemap: stuck
Unit slows down too slowly, goes into typemap: stuck
Typemaps are filled with all sorts of issues like this when you explore them
Really, most games suffer from this problem of units getting stuck on terrain they can't navigate, it's just a rare occaision without the typemap making the issue more common.
But either way, a soft limit of "unit moves really slow on typemap X" is a good solution.
Last edited by Pxtl on 14 Apr 2011, 17:48, edited 1 time in total.
Re: Unit Movement
Try out "GundamRTS" as it has squads that work as you've described them. I'm pretty sure all of the behaviour is in Lua scripts so you could poke at them and figure out how smoth accomplished it.Von66341 wrote:Google_Frog mind sharing some ways I could explore on squad commands?
I am currently able to spawn my units in squad.
So for e.g. if I have 5 solider, the 5 solider will spawn together at game start.
Do I need to script a widget or gadget so they will move together and support each other in the battle.
Re: Unit Movement
Kdr coded the thing btw I don't even remember what/if I did any time on it
Re: Unit Movement
Thanks lots for the guidance! The scripts from gundam works well with slight modification. Thanks! =D
- bobthedinosaur
- Blood & Steel Developer
- Posts: 2700
- Joined: 25 Aug 2004, 13:31
Re: Unit Movement
Cuberor uses this.
Re: Unit Movement
This squad thing, is it like AoE2 formations? or just a "move as group" sort of thing?
Re: Unit Movement
Links to the orignal gadget that was used in gundam.
http://springrts.com/phpbb/viewtopic.ph ... &view=next
http://springrts.com/phpbb/viewtopic.ph ... &view=next