Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Help with Selecting Multiple units

Author
Message
CSGames94
16
Years of Service
User Offline
Joined: 27th Dec 2007
Location:
Posted: 7th Jun 2008 21:55
I been trying to get this to work, but no success.
Well here is the code if any body can help, and the code contains custom media.
Lord Einstein
19
Years of Service
User Offline
Joined: 22nd Oct 2005
Location: Well here, of course...
Posted: 9th Jun 2008 17:23
To select multiple units you usually have an array which stores 30 or so object numbers. Each number refers to a unit currently selected. However, this means that you can only select a certain amount of units.

To show their selected either draw circles on the screen or have lots of plains with a circle texture and position them where the unit is standing. You can get the computer to cycle through all of the units using the for : next command.

When you want to move them you just cycle through all of the units and set their targets simularly to how you would if only one was selected.
Erios
18
Years of Service
User Offline
Joined: 17th Jun 2006
Location:
Posted: 12th Jun 2008 06:44
Quote: "To select multiple units you usually have an array which stores 30 or so object numbers. Each number refers to a unit currently selected. However, this means that you can only select a certain amount of units."


I could be wrong, but I think most of the RTSs that I have played only allow you to select up to a certain amount of units at one time. I suppose this is to keep the player from selecting their entire force and moving them in for the kill too quickly. So this may not be that bad of a limitation, since it will probably be what most players are familiar with.

Login to post a reply

Server time is: 2024-11-25 04:50:37
Your offset time is: 2024-11-25 04:50:37