OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: aurek on 07 Apr 2003, 19:32:17
-
In a mission I am making I have the player and squad, a friendly squad and a friendly BMD.
because I have to setpos theese units around a bit for cutscenes I cant give them waypoints. so Ive used scripts to set they're combat modes and behaviours. For movement I placed an invisible H called bmdpoint1 (etc) and the command:
bmd domove getpos bmdpoint1
Now for the bmd this works fine but not for the friendly squad. Ive tried everything. Telling the leader to domove or commandmove or even every individual soldier domove or commandmove! Ive even tried changing the invisible H for a marker and using getmarkerpos. but nothing works, the squad refuses to move. Can anyone help?
-
try
grp1 move getpos whatever
-
Or try
"_x commandmove getpos whatever" foreach units friendlysquad
-
Here's a quick rundown on the differences between move, domove and commandmove.
- Move: This will give the whole group movement orders, effectively setting a new waypoint for the group (in fact that's exactly what it does).
- Commandmove: This will give a single unit an order to move to a position. The leader of the unit's group will issue the order, eg. "2 GO TO 21 7"
- DoMove: This is the silent form of commandmove. It is exactly the same command, except the unit's leader won't give the order.
So from that list I'd say your definately after the Move command ;)
-
Excellent I'll try that, thanks :)
-
Ok unfortunatly that dosent work.
Ill explain the format of that part of the mission a little bit.
two mi17's approach your position, one parachutes 4 spetznatz
the other parachutes a bmd
Inside the bmd is a squad
The commander has this in his intfield:
red = group this ; "_x moveincargo bmd" foreach units red
his name (in editor) is red1 with the squad folling that convention up to 6
So, black out and you, the bmd and red squad are setpos'd. Black in, some titletexts follow.
Black out, setpos bmd and red squad to a position east of you (better for attack)
Using snypirs radio tutorial I have setup so at this point a new option appears in the radio 3 and 4 slot. Red squad attack and bmd attack respectively.
When selecting either of theese a script is run: red.sqs or bmd.sqs
red.sqs contains:
vlad1 sidechat "Red squad, attack"
~4
Red1 globalchat "Roger, moving in now"
red move getpos base
red setbehaviour "combat"
red setcombatmode "red"
Exit
as aid I have tried every combination of move order and none work (however domove works fine for the bmd)
What am I doing wrong?? :)
-
Hmm... how far away is the group exactly?
I reckon it's because they're crawling to the base, rather than walking/running...
Try setting their behaviour to "AWARE" rather than "COMBAT".
Another thing you could try (if the above isn't the problem) is change red to red1 in your move order. It shouldn't make any difference as far as I can see, but sometimes OFP does strange things ;)
-
They change they're behaviour fine, but then they all just jump on the ground and refuse to move.
Could it be because after setposing them I gave a:
red1 dowatch vlad1
command, could he still be trying to do it and therefore wont move?
Ill try giving the command to red1 and report what happends :)
-
When playing as group leader and you're getting out of a choppe with the rest of your team they won't follow you, you need to issue the order 'all fall back into formation'. Maybe that's the problem ?
-
They change they're behaviour fine, but then they all just jump on the ground and refuse to move.
That was my point... the AI can sometimes take ages to go anywhere on combat behaviour (as they crawl).
However I think Dr. Strangelove may have hit the nail on the head...
After you give them their move command, try:
"_x dofollow (leader _x)" foreach units group
And see if they move their arses then ;)