Home   Help Search Login Register  

Author Topic: Commanding troops  (Read 2310 times)

0 Members and 2 Guests are viewing this topic.

Kojak

  • Guest
Commanding troops
« on: 07 Mar 2004, 13:52:45 »
Hello people, long time no see! I did hang around here quite a long time ago before real life needed me, but now I'm back - and with a couple of questions:

I'm thinking of making some kind of command engine - if it hasn't been done already - if so, please do point me in the right direction and I'll be on my way. What I want do is this:

The player/commander should be able to move units across the map via map clicks. I have found some info about the OnMapSingleClick, but I need some help with that.

The next feature I was thinking about was the ability to order specific unit formations and attack/defend orders - and perhaps the ability to board and disembark vehicles.

I'm just beginning to pick up the old editing skills, so please bear with me... :)

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Commanding troops
« Reply #1 on: 07 Mar 2004, 14:16:33 »
Welcome back!

This has been done several times, most comprehensively by the Chain of Command mod.  Link in the Ed Depot, onthe left hand menu column.    Their engine is complex and sophisticated:  various mission designers have used simpler version in their missions ... I think deaddog's lost in nam in the beta forum has one.

OFP legend is that that the onmapsingleclick command was created by BIS specifically to help CoC.  It's a tricky command to use, not simple, but there is plenty of stuff around the ed depot and the forums if you search for it.
Plenty of reviewed ArmA missions for you to play

sa8gecko

  • Guest
Re:Commanding troops
« Reply #2 on: 07 Mar 2004, 14:19:32 »
I've seen something similar to what you probably have in mind
in the latest 'Battle Over Hokkaido' release. In "Battle of Everon"
mission you control your units with radio, and direct them to engage
the enemy. Your units are made up of 8 various groups, I think only
8 because that's how many radio channels are, but with a little
tweaking I think you can get more under your control.
It is a big download only to have a look at one mission,  though.

I've just seen macguba's reply: maybe they too used CoC.
« Last Edit: 07 Mar 2004, 14:23:51 by sa8gecko »

Kojak

  • Guest
Re:Commanding troops
« Reply #3 on: 07 Mar 2004, 15:57:44 »
Well yes, I saw CoC engine and also tested it  :o - however, that seems to be a little too much, the same way as the command engine used in the mission Platoon Commander (excellent mission btw) is a bit too simple.

What I would like to do is mainly just this: the player clicks on the map and a squad move to that point - transport and formation can be left out at first. The CoC engine is great, but too large - I don't want to command an entire batalion here, a platoon is just fine.

As I haven't checked the Hokkaido: how advanced is that compared to the CoC engine?

sa8gecko

  • Guest
Re:Commanding troops
« Reply #4 on: 07 Mar 2004, 16:49:20 »
Sorry Kojak, I've never given a look at Coc (my fault), so I can't say
how it compares to Hokkaydo's. If you want I could un-pbo the mission
and PM you the scripts (if they're not too large).

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Commanding troops
« Reply #5 on: 07 Mar 2004, 16:51:21 »
Here's a script from one of my missions that pretty much does what you want for one group.    Feel free to adapt it for yourself, just give me a credit in the readme.   In this case the player commands a tank troop and the group controlled by the script is the Company Sergeant Major with ammo and repair trucks and an amublance.

The mission is Regina Proeliorum which is nearly finished, really just needs an intro and stuff.     It's addon-heavy but if you like you can grab it here.    I haven't touched it for many many months so don't ask me how this script works.   ;D

To make it work name the player tank1C and have a group named CSM:  you'll need to setup the radio trigger too.
« Last Edit: 07 Mar 2004, 16:52:36 by macguba »
Plenty of reviewed ArmA missions for you to play

Kojak

  • Guest
Re:Commanding troops
« Reply #6 on: 07 Mar 2004, 17:30:58 »
Nice macguba - I'll try that if (when) my try fail... :p

Anyway, this is what I have so far:

Code: [Select]
Hint "Click on the map where the unit should go."

onmapsingleclick {"alphamarker" setmarkerpos _pos;onmapsingleclick {}}
[group1] domove (getmarkerpos "alphamarker")

aP sidechat "Alpha, move into position."
leader group1 sidechat "Roger, moving on."

Exit


alphamarker is the marker, group1 the unit Alpha and aP obviously the player. Now, this works, with a full load of errors:

The command can be given, but not changed until Alpha reached it's target - not until then is it possible to give it another destination;

It doesn't notify the player when Alpha arrives;

It doesn't check if Alpha is alive in the first place;

Alpha won't report in enemies it runs into.

The radio chatter comes before the player clicks the map...  :P

What the script do, in short, is simply to send out Alpha on a chase for a marker... Yippieee - did I forget that much?
« Last Edit: 07 Mar 2004, 17:32:36 by Kojak »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Commanding troops
« Reply #7 on: 07 Mar 2004, 17:59:50 »
 ;D Yep, those were exactly the problems I faced.   They are all solved (I think) in my version.   Except running into enemies, it doesn't do anything about that.
Plenty of reviewed ArmA missions for you to play

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Commanding troops
« Reply #8 on: 07 Mar 2004, 18:16:36 »
Well, you could give my MOTAG (MOre Than A Group) a
try, as i think it comes along with the features you're
expecting here.

This is a simple example mission, including a readme file,
where there's explained, how to add further groups.

btw - the version of MOTAG in the sample mission is
1.58, but i'm already on version 1.59. The only thing is:

I haven't made a sample for 1.59 yet, and for a first try
for you it's not really important, as if you like it, we can
still do something later at a time  ;)

~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

Kojak

  • Guest
Re:Commanding troops
« Reply #9 on: 07 Mar 2004, 22:13:57 »
Not bad at all - macgubas script is somewhat more limited as it has been hardcoded so to speak into the units used, but I'm sure it works - if I could figure out what's what... :p

Chris, that's a lil more of what I had in mind - a lot more in fact. What I would like to work around though is:

1. The starting of the MOTAG - is it necessary to actually start it?
2. Putting units in the pool - for moving several units at the same time to the same location, this is great, but it does make it somewhat more complicated - Â'before I figured out I had to empty the pool before filling it with another unit, I had moved the snipers together with the tanks right into St Pierre...
3. There were some cosmetic stuff too, but that's not really important here.

But that was good - I didn't find a readme however, so I had to figure things out on my own - and the scripting world is a dark, unforgiving place...  ;)

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Commanding troops
« Reply #10 on: 07 Mar 2004, 22:30:55 »
Lol mine has indeed been hardcoded to a specific circumstance:  it sounds like Chris's might be more what you need.  He's a better scripter than me anyway.     Mine does work, it has been [implicitly] tested in the missions beta forum.

And you're right, figuring out how somebody else's script works (or even your own sometimes) is a long and sorry task.
Plenty of reviewed ArmA missions for you to play

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Commanding troops
« Reply #11 on: 07 Mar 2004, 23:04:07 »
Well first off i should tell you that the example was made
once during 5 mins of editing, and i made that only to let
a mate of mine have a look onto MOTAG.

Therefore the mission itself wasn't well thought.

In case of the start of MOTAG you're totally right.
The radio-call trigger to start MOTAG is only there, to show
that it can be started during an already running mission.

MOTAG can be started however you want.

About the missing readme  :o - check it out again and watch
out for the file called: readme.txt  ;) ;D

About the add to pool/clear pool, i'm sorry not to have warned
yer, but it's in the readme too  :)

However, in MOTAG v1.59 i've changed  the start routine as it's
nomore using the init.sqs to initialize the starting groups.

I'm gonna upload MOTAG v1.59 core, so that you can try the newer version too.

A readme.txt is also included there, but no mission.sqm file.

Just copy all the scripts into one of your mission folders and check
the readme for how to continue.

The idea of MOTAG in general was to give mission makers a
multi group control system, easy to implement and easy to
use ingame - without the need for any addons.

Also i thought of making a couple of missions with MOTAG - like
some kind'a campaign or so.

just for info: MOTAG can be used also for groups of any side,
what means you have control over any unit on the map - if you
want.

*hint* test missions - watch a war - etc.  8)

Anyway - have a look at v1.59 - if you want, and especially have
a look into the readme file - you'll see it's not hard to implement
it into maps. If you're playing around a lil bit with it, you may
get behind the secrets of it aswell.

If you have a look onto the names of the scripts, you will see
that i tried to use some kind of naming system to seperate
the script types.

e.g: there's the advanced options, where each script's name
starts with: adv_.....
These are all custom action scripts only, to change settings
for the groups.

The main engine consists of let's say a few 5 or 6 scripts only.

Also i'm only using 3 scripts to add custom actions to the player,
as there are 3 different stages of menu levels.

btw - there's one script, which has nothing to do with MOTAG,
and that's brf_gunner. The brf_gunner script just deals with
a waypoint type scripted and a group which instantly remounts
a gun whenever the actual gunner gets killed. Once the last
men of such a group has been killed, the script eliminates the
gun.

If you go a bit deeper into that MOTAG, i can still tell you something more about the scripts and techniques itself.

:edit - ah yeah, maybe i should have mentioned that
the readme.txt file is included in the mission folder.
Could be that you didn't expect it to be there.

~S~ CD
« Last Edit: 08 Mar 2004, 00:45:58 by Chris Death »
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Kojak

  • Guest
Re:Commanding troops
« Reply #12 on: 09 Mar 2004, 18:10:50 »
Ok - Chris, I found the readme - well, finding is soo much easier when searching the right place. :D

This is good, it really is, and well beyond my abilities. I'm testing it right now, and I'm going to see if there is anything I can tweak somewhere somehow - hope you don't mind.

But apart from this, how many command engines are there? I know about Chain of Commands, and gecko mentioned battle over hokkaido, so the idea is not new obviously.

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Commanding troops
« Reply #13 on: 09 Mar 2004, 18:31:11 »
Quote
The idea of MOTAG in general was to give mission makers a
multi group control system, easy to implement and easy to
use ingame - without the need for any addons.


Does that make sense?  :D

~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

Kojak

  • Guest
Re:Commanding troops
« Reply #14 on: 10 Mar 2004, 19:59:55 »
Absolutely - clear as polished crystal. :)

Oh btw, I haven't got around to check that motag of yours lately - I'll be back later on that.

Kojak

  • Guest
Re:Commanding troops
« Reply #15 on: 12 Mar 2004, 01:35:28 »
Sometimes you find little gems... The SP mission Take the airport http://www.ofpec.com/missions_depot/index.php?ID=837 had exactly what I wanted - an easy to use command engine, according to the intro made by Moph. Does anyone know how this one work?

Ronald Speirs

  • Guest
Re:Commanding troops
« Reply #16 on: 12 Mar 2004, 20:20:18 »
I've also created a command script based on the simple multiple squad control script of Moph.

If you want to see what it can do, check out the single player mission "Take the Airport" in the missions depot, recently reviewed by Wolfsbane.  ;)

Cheerio,

Ronald Speirs
101 Airborne Division
506 Infantry Regiment
Easy-Company

Kojak

  • Guest
Re:Commanding troops
« Reply #17 on: 13 Mar 2004, 04:13:31 »
Hey, it's you!  :wow: I must say, damn fine mission - difficult but one of the best missions I have played - and I'm picky. :thumbsup:

Now, are you interested in spilling the beans on how that was made?  ;)

Ronald Speirs

  • Guest
Re:Commanding troops
« Reply #18 on: 13 Mar 2004, 12:47:42 »
Yes it's me alright  ;D

For some details on the script I have created, look under 'units and groups' in the editors depot for a script named: "Two player Simple multiple squad control".

My script is an 'advanced' version of the script Moph originally designed.

The script in the editors depot contains a player vs player example, but it can also be used for single player missions as demonstrated in 'Take the Airport'. ;)

Cheers,
 
Ronald Speirs
101 Airborne Division
506 Infantry Regiment
Easy-Company

Kojak

  • Guest
Re:Commanding troops
« Reply #19 on: 13 Mar 2004, 14:16:03 »
Checking it right now - I'll be back later with my questions - and there will be questions, no question about it. :P

Kojak

  • Guest
Re:Commanding troops
« Reply #20 on: 14 Mar 2004, 01:31:23 »
People, I'm happy to announce that Moph's and Speirs scripts work like a charm. :D  Now, this was what I was looking for in the first place, and see, I have found it!

Moph, Speir, I owe you one! :thumbsup: