OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Bad Maniac on 24 Apr 2003, 18:09:25

Title: Giving orders to specific people in a tank crew?
Post by: Bad Maniac on 24 Apr 2003, 18:09:25
How would I order, for example, the driver of a tank to do an action "something"; command?

I saw in another thread that MacGuba said Tank_1D for Driver, but this does nothing. (I'm trying to get a tank crew to turn in, and follow an infantry group, and neither command does anything, and I've used the exact commands from the CMD Ref.
Title: Re:Giving orders to specific people in a tank crew?
Post by: macguba on 24 Apr 2003, 18:31:36
When you name a vehicle, the crew of the vehicle are given names automatically based on the vehicle name.

For example, if you name a tank Abrams1, the crew will automatically be named

Abrams1D - driver
Abrams1G - gunner
Abrams1C - commander

If you wanted the tank to follow and infantry group then the code would be something like

Abrams1 doFollow leader InfGrp1

In other words you would give the command to the whole tank, not individual crewmembers.   Check the syntax btw.

Turning in is an action I believe, I've never used it so I'm not an expert.   Search the FAQ and forums and make sure you get the syntax right, it's not always easy with actions.  It might be

Abrams1D action ["Turn in"]

Then again it might not.
Title: Re:Giving orders to specific people in a tank crew?
Post by: Bad Maniac on 24 Apr 2003, 19:07:12
right, InfGrp 1, HOW ON EARTH!!! (sorry for shouting) do I name a group? Im so tired of this, because everything I have had problems with so far has always been because I have to name a group. And this seems to be the most elusive piece of information I have ever failed to find!
Title: Re:Giving orders to specific people in a tank crew?
Post by: Artak on 24 Apr 2003, 19:14:00
Yes. You name a group by placing into the group leaders init field

infgrp1 = group this
Title: Re:Giving orders to specific people in a tank crew?
Post by: Bad Maniac on 24 Apr 2003, 19:26:21
my tank is called T1
the group leader fo the infantry group is called cmd1
Since I cant name a group, I tried
T1 doFollow leader group cmd1 but it does nothing so I tried
T1C join group cmd1 and T1 join group cmd1 gives me an error, array expected
so [T1, T2, T3, T4] join group cmd1 does nothing and so on...

I'm tired...  ???
[edit]
thanks! I named it egrp1, and proceede to try all the examples above, like:
T1 doFollow leader egrp1
[T1, T2, T3, T4] join egrp1

and guess what, nothing happens...
Could someone have mercy on my soul and just GIVE me a correct tested line of code before I hang myself (Not that that would be a bad thing...)

My infantry group is called egrp1
Leader of that group is cmd1
and my tanks are T1, T2, T3 and T4 (I tried with them grouped and not grouped.)

please.
Title: Re:Giving orders to specific people in a tank crew?
Post by: macguba on 24 Apr 2003, 20:02:13
lol we've all been there.   OFP editing is very frustrating until you've learnt a minimum "vocabulary".  The good news is that you are nearly there.

Remember that you can't have more than 12 loons in a group.   A tank has a crew of 3 so 4 tanks max out a group.  Also, although some commands can be given directly to a tank, join is not one of them.

Now, if you use this line

leader InfGrp1

it returns the current leader of that group.    If you name the original leader and he gets himself killed, it can screw things up.   So use the leader thing instead.

This is a line of code copied and pasted from one of my (working) scripts

[bmp1D, bmp1C, bmp1G] join armour

Or in your case

[T1D, T1C, T1G] join InfGrp.

Remember to put Artak's line of code in the group leader's init field.
Title: Re:Giving orders to specific people in a tank crew?
Post by: Bad Maniac on 24 Apr 2003, 20:35:58
Well, you see, the infantry group allready consist of  9 loons and a bmp, so its allready full, wich is why I wnt to make the GOD DAMN!!! tanks follow it. I don't know about you guys, but in a real army, an infantry group of 12 is tiny, I want to march regiments of 10000 men over the field, backed up by 400 tanks. THATS a military simulation...

Anyways, I scaled down my ideal battle to one infantry group and four tanks. but it doesn't work. So far the only thing OP:FP has simulated is a headache  :D

I just want the four tanks to follow my group of loons, and help them out.
Title: Re:Giving orders to specific people in a tank crew?
Post by: macguba on 24 Apr 2003, 21:02:06
How about

(leader tankGrp) doFollow (leader infGrp)

Alternatively, write/borrow a following script, there may be one in the Ed Depot.   If not, there's one in my mission Regina Proeliorum which you can find in the beta forum .. d/l, unpbo and find the script called Shilka1.sqs.    It's basically just a loop of distance and doMove commands.  You'll have to adapt it obviously.
Title: Re:Giving orders to specific people in a tank crew?
Post by: Bad Maniac on 24 Apr 2003, 22:03:01
I tried setting a support waypoint attached to the leader of the infantry group, guess what, IT WORKS!!!

the crew of the tank gets out and starts supporting the leader of the infantry squad.  And you are telling me that the best military sim ever made, and that has sold 10 million copies, doesn't have a function to make one unit follow another  :o

*uninstalls OP:F* >:(

Title: Re:Giving orders to specific people in a tank crew?
Post by: LCD on 24 Apr 2003, 22:18:05
da support WP is 4 support vehicles ::) :P

nd u can do simple domov loop in a script nd it wil work v. good

or here is idea (didnt test ;D)

if da infntry r outside da bmp just split da tank grp to 2 nd have leaders in da BMP 4 each tank group ;D

Quote
I want to march regiments of 10000 men over the field, backed up by 400 tanks. THATS a military simulation...

OFP is small squad based warfare sim :P

md if u have stron enough comp u can do 1000 men fightin ::) :P

LCD OUT
Title: Re:Giving orders to specific people in a tank crew?
Post by: Bad Maniac on 24 Apr 2003, 23:18:34
or here is idea (didnt test ;D)
if da infntry r outside da bmp just split da tank grp to 2 nd have leaders in da BMP 4 each tank group ;D

7h47 c0u1|) \/\/0r|<  8)
Title: Re:Giving orders to specific people in a tank crew?
Post by: LCD on 24 Apr 2003, 23:26:53
Quote
7h47 c0u1|) \/\/0r|<  

just cant understand ur first word ::)

wat cud work ? :P

LCD OUT

Title: Re:Giving orders to specific people in a tank crew?
Post by: Bad Maniac on 24 Apr 2003, 23:29:26
THAT could work  ;)

Actually, Im gonna try it now.
Title: Re:Giving orders to specific people in a tank crew?
Post by: Bad Maniac on 24 Apr 2003, 23:47:27
It works like a charm, except now the stupid infantry loons try to get in the BMP and so they dont patrol along side it. I solved that in the same way. Mae the loons into their own group, and placed the leader in the BMP, then made the BMP leader and the highest rank of all, then added a few more tanks, and DAMn it looks cool.


[edit]
I would like to thank you all for helping me in this thread, and apologize for certain harsh language and bad tone of "voice". I was simply irritated over the simplicity of my problem, and the impossibility to solve it.

OFPEC forum crew, thanks!  :D
[/edit]
Title: Re:Giving orders to specific people in a tank crew?
Post by: LCD on 25 Apr 2003, 00:10:55
(http://www.spielerboard.net/images/smilies/lool.gif)

nd in da fightin u can tel da men 2 disembark nd dere r more ppl fightin 2 ;D

btw if dere is no prob nymore - solve da topic

LCD OUT