Home   Help Search Login Register  

Author Topic: Friendly fire  (Read 1447 times)

0 Members and 1 Guest are viewing this topic.

Offline Ducatisto

  • Members
  • *
  • I'm a noob at this!
Friendly fire
« on: 31 Mar 2004, 10:40:54 »
Ok, the scenario as it stands im my editor;

I have tanks and crews on standby already positioned, they go into action as soon as a trigger gets actioned. A similar trigger gets actioned at around the same time but spawns a group of 8 troops. Now my problem is these two factions hate each others guts and when in sight of each other fight like cat and dog. Ok you say, they are supposed to do that, but all I have is "east" sided troops, tanks, aircraft, helos and buildings on my map!!!

All I want to know is why would spawned "east" troops attack previously placed "east" units? I have tried "this setcaptive true" in the tanks init line to try to stop them being targetted but all I get is a massacre with the tanks laying waste to the troops. There are no "west or "resistance" units placed on the map as of yet. I am loathe to do so as I can see that I may have the same problem as I am suffereing now  :'(

I am getting to desperation now. This is my first attempt at mission building and I can say that I am none too happy. I have taken it slowly by introducing spawn scripts to help reduce unit population at the outset (lag is our enemy  ;)) and have minimal (as few as it takes) placed units at the outset. So, any ideas as to why I am getting "in house" fighting?

FYI. I have tried multiple spawn scripts and they all yield the same problem  ???

Offline Zombie

  • Members
  • *
  • Beware the night, the zombie walks among you
    • USI
Re:Friendly fire
« Reply #1 on: 31 Mar 2004, 13:30:57 »
hmmm, that is very odd.  Can you post the most recent script you are using to spawn the troops, that may help to point out the trouble.

Offline Ducatisto

  • Members
  • *
  • I'm a noob at this!
Re:Friendly fire
« Reply #2 on: 01 Apr 2004, 00:49:55 »
As I said, I have used four different spawn scripts written by different people and the end result is the same  ???
Code: [Select]
;-------------------------------------------------------------
"OfficerE" createunit [getMarkerPos "inf1",east1,"s1=this",1,"LIEUTENANT"]
"SoldierEMG" createunit [getMarkerPos "inf1",east1,"s2=this",0.8,"SERGEANT"]
"SoldierEG" createunit [getMarkerPos "inf1",east1,"s3=this",0.7,"CORPORAL"]
"SoldierEG" createunit [getMarkerPos "inf1",east1,"s4=this",0.7,"CORPORAL"]
"SoldierELAW" createunit [getMarkerPos "inf1",east1,"s5=this",0.6,"PRIVATE"]
"SoldierEMedic" createunit [getMarkerPos "inf1",east1,"s6=this",0.6,"PRIVATE"]
~2
east1 move getmarkerpos "inf1move"
;-------------------------------------------------------------

Code: [Select]
#spawnrest
~1
"SoldierEB" createUnit [getPos (_base), _grp]
"SoldierEB" createUnit [getpos (_base), _grp]
"SoldierEG" createUnit [getpos (_base), _grp]
"SoldierEG" createUnit [getpos (_base), _grp]
"SoldierELAW" createUnit [getpos (_base), _grp]
"SoldierEMG" createUnit [getpos (_base), _grp]
"SoldierEMG" createUnit [getpos (_base), _grp]
"SoldierEMedic" createUnit [getpos (_base), _grp]
"SoldierEB" createUnit [getPos (_base), _grp]
~1
?(count units _grp >= 9):goto "groupfull"

Just part of two scripts I have used. East through and through.  :-\

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:Friendly fire
« Reply #3 on: 01 Apr 2004, 05:39:13 »
How is east1 group defined in the first script and how _grp in the second script? The only way I could imagine this to happen is that the east1 group is made by inserting a west or res guy in editor and in his init 'east1 = group this; deletevehicle this'. This way the created units will be east units on west side.. but being such an obvious answer, I think it's not it.
Not all is lost.

Offline Ducatisto

  • Members
  • *
  • I'm a noob at this!
Re:Friendly fire
« Reply #4 on: 01 Apr 2004, 08:53:37 »
How is east1 group defined in the first script and how _grp in the second script? The only way I could imagine this to happen is that the east1 group is made by inserting a west or res guy in editor and in his init 'east1 = group this; deletevehicle this'. This way the created units will be east units on west side.. but being such an obvious answer, I think it's not it.

Artak, never, ever look past the bleedin' obvious. :-X After reading your post, and thanks for the reply, I checked my "dummy" and lo and behold it was a west unit. I had placed it at the beginning and completely overlooked that I may have inserted a west unit instead of a good ole red un'. Oh do I feel a fool. I looked through the scripts over and over without finding anything that could have lead to my predicament.

Believe me when I say, that if I met you in a pub I would lavish you with ale in thanks. ;)