Home   Help Search Login Register  

Author Topic: Clickable Command System  (Read 1041 times)

0 Members and 1 Guest are viewing this topic.

Homefry

  • Guest
Clickable Command System
« on: 07 Jul 2006, 18:38:17 »
I've been tossing around this idea for a while now, but it seems a bit difficult to implement as far as I know.  I'd like to develop some sort of simple command system, creating an RTS type system.  I imagine FWATCH can be used, for easier control (key commands, etc.)

Basically, the command system would have to use a dialog type system.  But, the problem I have comes to selecting units.  I'd like to try and develop some sort of selection system, much like most RTS games.  That is, the expanding box system.  I know OFP already has such a function, in command mode.  However, you can only use when you are in command, and you can only select units in your group.  Now, with the editing knowledge that I know, one cannot dynamically resize triggers... and that would be the only selection method suitable, AFAIK.  I have a few other ideas, however.

When you drag from one location to another, you simply create a box.  In doing so, you have a box with particular coordinates.  So, my idea would just be to move a game logic in segments across the entire box, using the nearestobject command to add all possible units into an array.  Of course you'd need a check to determine if the unit is already in the array, but that isn't a huge deal.

My second selection idea is a method in which one could select indivudual units, then add all of them to an array.  In doing this, you could have unlimited group sizes.  Using fwatch, I can determine if a user has control pressed while clicking. If so, select the unit (using nearestobject) and add it to an array.  Then, I can do what I want to these units.


Now, I have some other ideas.  With default OFP, there is no way to click on a unit, and assign it as a target (to other groups, soldiers, etc).  However, I believe there is a way to accomplish this.  With a trigger, one add all enemy units into an array.  Now, it would also be possible to monitor all coordinates, though it probably isn't very CPU friendly.  However, if one were to break up the map into virtual view segments, it could become practical.  For example. A map is divided into two square kilometer sections.  If the player has units selected, a script (or external program utilizing fwatch) would begin recording the coordinates of all units in the area.  Once the player clicks near an enemy unit, the script would detect if the click location was within a few meters of an enemy unit.  If so, that unit would be designated as a target.

Of course, I've got even more ideas.  But i've typed enough.  Any ideas from anyone else? Input?

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re: Clickable Command System
« Reply #1 on: 11 Jul 2006, 17:49:41 »
LwLooz of the ofp zeus community made a nearest to map click command system
although i dont think he quite finished it.
It used COC NS

i also played around with an MP command system, i never got tround to finishing it.
This worked via a bunch of drop down boxes in a dialog and would have also utilised nearest map click

The system was designed to run with WGL
WGL has global variables within the mod which gives you a list of all groups or units per side
so this negated the use of a repeating / anybody trigger encompassing the whole area, however a system for use outside wgl would most likely use a trigger to populate unit and group arrays

The system i was designing, works in the following way
Start the dialog up

from the Group selection "drop down combo box"
You selected the group
group selections were
All groups
Individula groups
All Players
All group leaders
 i also intended to add selections like
All snipers
All armoured crews
All medics
All helo crews etc

having selected a group, the unit drop down box would be populated.
It's content was a list of units of the selected group

From this pull down box you could select
Individual unit
All units

from there you basically went through more drop down boxes, basically setting up a bunch of orders
and then these would be transmitted to the local client where the order needed to be carried out, using coc NS

a set of markers tracking units in the selected group and the position of all group leaders on a given side were visible in map display and later implementation in the design would allow you to select units or groups using nearest unit to map click etc

it isn't anywhere near a test beta version and i have no idea if it ever will be, however here is a link to the file as it is now, it may give you some ideas

http://www.terox.nildram.co.uk/ofpec/commandsystem.rar

Play the officer, about 5 seconds into the mission, you get an addaction attached to you, which starts the command and control dialog
Addons required are :
WGL


Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

Homefry

  • Guest
Re: Clickable Command System
« Reply #2 on: 12 Jul 2006, 17:30:45 »
Alright, it looks pretty interesting, I'll have a look when I get home tonight.

I was trying to figure out how to use a system that didn't use the map, rather you could use your normal view to somehow select units, but that's where I'm getting stuck.  I'm thinking about utilizing the builtin function of camera.sqs (copying coordinates to the clipboard), and using Fwatch to read that data.  From there, move a game logic into place and use the nearestobject command. 

But it will require some experimenting.  I'll check your system out tonight and give it a try. 

As for dialogs, I'm interested in how you did everything.  Thanks for the reply and all.  :)