Home   Help Search Login Register  

Author Topic: Currently selected units?  (Read 448 times)

0 Members and 1 Guest are viewing this topic.

skreet

  • Guest
Currently selected units?
« on: 17 Sep 2003, 14:31:34 »
I'm not sure if this is advanced or not, but I can't figure this one out. Is there a way so check units that are currently selected by the player? you know, you have a squad and you can select them with F#.. so is there a global array where this can be seen or something else?
« Last Edit: 17 Sep 2003, 21:47:45 by skreet »

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Currently selected units?
« Reply #1 on: 17 Sep 2003, 16:15:15 »
Look at this:

Code: [Select]
onMapSingleClick command
Operand types:
    command: String
Compatibility:
    Version 1.85 required.
Type of returned value:
    Nothing
Description:
    Define action performed when user clicks in map. Command receives:
   
    _pos array position
    _units array selected units
    _shift,_alt bool key state
   
    If click is processed, command should return true.

Example:
    onMapSingleClick {"SoldierWB" createUnit [_pos,group player];true}


_units is the one you're asking for

So basically the array you're talking about exists.

But i'm not sure, wether it's possible to access those selected
units without summit special like the onMapSingleClick.
(haven't tried or needed that yet).

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

skreet

  • Guest
Re:Currently selected units?
« Reply #2 on: 17 Sep 2003, 21:46:08 »
yes, I also noticed that _units array in OnMapSingleClick[], that's where I got this idea that there might be an array in somewhere  ::)

if someone knows, then please let me know! I'd really appreciate  that..
« Last Edit: 23 Sep 2003, 11:39:49 by Skreet »