Home   Help Search Login Register  

Author Topic: Bridges (general)  (Read 1796 times)

0 Members and 1 Guest are viewing this topic.

Offline bardosy

  • Honoured Contributor
  • ***
  • campaign designer
    • CartooDiv
Bridges (general)
« on: 20 Apr 2007, 11:02:53 »
Mission designers!

Are you made mission where a squad have to cross a river on a bridge on foot?

Small team (4-5 men) could walk through a bridge in "close column" formation, but a full squad (10-12 men) coudn't... OK, sometimes could, but not always... It's very annoying. The whole mission is stucked if the player can't across on the bridge with his team.

What is your opinion?
Do you solve it?

I made a teleport script, but it's weird.
Fix bayonet!

Offline Captain Crunch

  • Members
  • *
Re: Bridges (general)
« Reply #1 on: 20 Apr 2007, 11:34:17 »
Hallo bardosy,

I have tried many things myself and was unsuccessful. It is frustrating. I have tanks and troops who should be crossing the bridge or river and they jam everything. So I abandonned the mission although I have put so many hours in it. I guess one could create small teams instead but it is a lot of work to place for each one a few waypoints and all. Maybe You could regroup the many small troops into larger ones once across the bridge? I will try this, maybe it will save the missions. I'll let You know if it works for me.

Jason
Back to the forest!

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re: Bridges (general)
« Reply #2 on: 20 Apr 2007, 17:37:09 »
This was one of the reasons I hated the street lights on the bridges in OFP. They looked pretty and provided infantry cover, but caused convoys to get jammed up. I once wrote a script for a 4 truck convoy. My advice would be to ask THobson what he did for this in his Abandoned Armies mission for OFP. Or write a script that forces the units to remain in a tight column formation, for as long as they are on the bridge.
« Last Edit: 30 Apr 2007, 01:44:22 by Mr.Peanut »
urp!

Offline LeeHunt

  • Former Staff
  • ****
  • John 21:25
Re: Bridges (general)
« Reply #3 on: 20 Apr 2007, 17:45:00 »
That's a good suggestion Mr. Peanut.   Here is the leadvehiclemonitor script by Trevor Hobson from Abandoned Armies (i've been using a lot of his scripts and ideas to try and recreate parts of the AA engine within my own mission). As far as I know with my own mission it works fine in Armed Assault.

Code: [Select]
; LeadVehicleMonitor.sqs by Trevor Hobson
; This script tries to ensure that a lead vehicle of a convoy or patrol does not get stuck
; This did happen to the east patrol after ~ 20 hours.  Hence this script.

; the lead vehicle is moved sideways if it has been stationary for a longish period of time

;called by:  [group] exec "LeadVehicleMonitor.sqs"


_grp = _this select 0


_leaderveh = vehicle (leader _grp)
_moveDistance = 3
_tolerance = 15
_maxconcurrent = 5

if not (canmove _leaderveh) then{exit}
if ((driver _leaderveh) == _leaderveh) then{exit}


_index = 0
#findData
if ((LeadVehPos select _index) select 0 == _grp) then {goto"foundIndex"}
_index = _index + 1
if (_index < count LeadVehPos) then {goto"findData"}
exit


#foundIndex
_vehData = LeadVehPos select _index
_prevpos = _vehData select 1
_counter = _vehData select 2

if (abs((_prevpos select 0) - (getPos _leaderveh select 0)) > _tolerance) then {_counter = 0;_prevpos = getPos _leaderveh;goto"end"}
if (abs((_prevpos select 1) - (getPos _leaderveh select 1)) > _tolerance) then {_counter = 0;_prevpos = getPos _leaderveh;goto"end"}

;Vehicle has remained stationary since last checked (reset _prevpos in case it has moved slightly)
_counter = _counter + 1
_prevpos = getPos _leaderveh

if (_counter < _maxconcurrent) then {goto"end"}

_dist = (_counter - _maxconcurrent)*_moveDistance*(-1)^_counter
_newX = (getPos _leaderveh select 0) + _dist * cos(getDir _leaderveh)
_newY = (getPos _leaderveh select 1) - _dist * sin(getDir _leaderveh)

_leaderveh setPos [_newX,_newY,0]

_leaderveh setFuel 1
_prevpos = getPos _leaderveh
leadVehicleSetPosCount = leadVehicleSetPosCount + 1
leadVehicleSetPos = leadVehicleSetPos + [_leaderveh]

#end

_vehData =[_grp,_prevpos,_counter]
LeadVehPos set [_index,_vehData]

exit

EDIT: Use the code tags when posting a long piece of code please. Tags added.  h-
« Last Edit: 20 Apr 2007, 20:42:35 by h- »

Offline bardosy

  • Honoured Contributor
  • ***
  • campaign designer
    • CartooDiv
Re: Bridges (general)
« Reply #4 on: 21 Apr 2007, 09:32:18 »
This problems are annoying too. But my problem is the player can't lead a team accross a bridge even in close column formation.
My men follow me to the middle of the bridge and then they stop. All of my men walk to the same position (about the middle of the bridge) and all men are in same place... :) 11 men looks like one 5-6 arms mutant. It could be funny.... But I need my men in the other side of the river.
Fix bayonet!

Offline bardosy

  • Honoured Contributor
  • ***
  • campaign designer
    • CartooDiv
Re: Bridges (general)
« Reply #5 on: 24 Apr 2007, 09:37:07 »
This happened in the middle of the bridge...
And they didn't want follow me to the other side.
Fix bayonet!

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re: Bridges (general)
« Reply #6 on: 24 Apr 2007, 16:37:10 »
Did you set their combat mode and behaviour to blue and careless while they cross the bridge?
urp!

Offline Cheetah

  • Former Staff
  • ****
Re: Bridges (general)
« Reply #7 on: 28 Apr 2007, 11:58:52 »
Judging the picture I'd say, yes he did. But these bridges are very frustrating. It was a problem in OFP, the errors in pathfinding and still hasn't been fixed.

That's why I don't like missions in Corazol, Dolores and any other heavily bridges places. But we could try to script a solution, although the upcoming update 1.06 could solve it.
Like missions? Help with Beta Testing! or take a look at the OFPEC Missions Depot for reviewed missions!