Home   Help Search Login Register  

Author Topic: Infantry cutting wire fences?  (Read 4803 times)

0 Members and 2 Guests are viewing this topic.

Offline Rommel92

  • Members
  • *
Re: Infantry cutting wire fences?
« Reply #15 on: 16 Apr 2008, 05:06:01 »
Best for readibility mate, put that in the [ code ] brackets.  ;)

Offline mathias_eichinger

  • Missions Depot
  • Administrator
  • *****
  • I'm a llama!
Re: Infantry cutting wire fences?
« Reply #16 on: 16 Apr 2008, 11:12:34 »
Wow, thank you very much, Darren!

I need to try it out today, looks like it could solve my problem!


Offline Darren

  • Members
  • *
Re: Infantry cutting wire fences?
« Reply #17 on: 16 Apr 2008, 23:23:34 »
 :-[     :whistle:      :D
Code: [Select]
; Appologies to all who had to bare witness to my stupidity!
; I did not know how the others got it right!!
;
;Special thanks to Rommel92 and his ability!
;As he has shown me the light!!

Oh, Mathias...
I only thought of it afterwards. I noticed that all units flawlessly executed each "Wire cutting" move to synchronised perfection.  Now...
Either they are the best trained military force in the world, that even under fire, their squad performs each move to military precision.  They would have had my old staff sergent standing with a giant military eraction if he saw that!!
Or they are a team of ex-"syncronised swimmers".  :dunno: :scratch:

Suggestion, once you know the group is in the area (and you have that array available), use a combination of various "wire cutting" animations (I don't know if there are any more) and radomly allocate them to the units in the array.  Also, try and insert a very small random delay (a few milliseconds only) between the execution of the animations.  This should give it a more realistic effect.

As my sample script monitors each unit in the group's distance to the fence, then once any individual unit reaches the minimum distance, the animation for that unit can start and that unit should be removed from the array.  This would ensure that as each unit enters the "Cut Zone" they individually start cutting.  :yes:

Should work  :whistle:
« Last Edit: 16 Apr 2008, 23:44:49 by Darren »

Offline mathias_eichinger

  • Missions Depot
  • Administrator
  • *****
  • I'm a llama!
Re: Infantry cutting wire fences?
« Reply #18 on: 16 Apr 2008, 23:58:48 »
Hey Darren!

Well, tried out your script and I don't know what I am doing wrong AGAIN; the soldiers in the trigger area perform exactly ONE animation before the script exits. Hell, I might just throw in a shitload of triggers and some single soldiers, as I wanted to avoid in the beginning...


Offline Darren

  • Members
  • *
Re: Infantry cutting wire fences?
« Reply #19 on: 17 Apr 2008, 21:39:59 »
Oh, wait... ???

Is the problem not the fact that only one soldier performs the animation (as all soldiers are animating!),
but only one animation is performed??
...and you want them to cut wire for the full 10 seconds?? :dunno:

Offline Rommel92

  • Members
  • *
Re: Infantry cutting wire fences?
« Reply #20 on: 17 Apr 2008, 22:18:23 »
Place maybe three triggers in the editor on same POSITION as the wire you wish to cut (with radius of about 3m)
Code: [Select]
BLUFOR - PRESENT
Condition: This
OnActivation: {[_x] spawn {for "_i" from 0 to 2 do{_this select 0 playmove "AinvPknlMstpSlayWrflDnon_medic";sleep 4.5;};deleteVehicle WIRE1;};} ForEach thislist;
Change WIRE1 to name of the wire to be cut, and do a few times along the fence, it'll be cut the second BLUFOR step into the trigger area, with all the guys in that trigger range performing the animation three/four times before deleting the wire.

Code Checked, works beaut. Example Mission Uploaded.
« Last Edit: 17 Apr 2008, 22:29:44 by Rommel92 »

Offline Captain

  • Members
  • *
Re: Infantry cutting wire fences?
« Reply #21 on: 18 Apr 2008, 00:13:49 »
Rather than having to name the section of fence can the script be modified to just detect fence objects nearby? I was hoping to make a new wire cutting inventory item and allow it to cut fences that are built into the map.

Offline bardosy

  • Honoured Contributor
  • ***
  • campaign designer
    • CartooDiv
Re: Infantry cutting wire fences?
« Reply #22 on: 18 Apr 2008, 07:18:09 »
Hey mathias,

I did this sample mission (attached) and I rework the cutter.sqs
Now it's works.

You have not set any condition in the WPs, just drop the way of engineers accross the wires (as you see, you can create multiple wire-blockade levels) and create a trigger to every blockade and call this cutter.sqs.
You can create individual engineer groups, they will work individually. If one group die, the other group can work...

For you I insert a T-72 and I put him WPs with condition. It cause the T-72 stop behind every blockade and wait for the engineers. If engineers destroy the blockade, the tank continue his way.

(My 1.08 ArmA is terrible with bridges, so your mission - and mine too - didn't work in the middle section of Corazol, on the bridge. But I create them in my mission too, and I hope in your 1.11 ArmA, they will work too.)
Fix bayonet!

Offline bardosy

  • Honoured Contributor
  • ***
  • campaign designer
    • CartooDiv
Re: Infantry cutting wire fences?
« Reply #23 on: 18 Apr 2008, 07:20:52 »
Now I explain you the cutter.sqs:

Code: [Select]
_engineers = _this select 0
_fences = _this select 1
These lines read the parameters.

Code: [Select]
_maxprogress = 20
This variable determine how fast engineer works. If you change it higher, they will work slowly. I suggest you to change it higher in the real mission.

Code: [Select]
{_x disableAI "MOVE"} foreach units _engineers
This line STOP the engineers (they will cannot move).

Code: [Select]
#loop

{_x playmove "AinvPknlMstpSlayWrflDnon_medic"} foreach units _engineers

~5
The loop started. And engineers play the medic anim. And script wait 5 second for the anim.

Code: [Select]
_progress = _progress + (count units _engineers)
Wire-cutting progress incresed by number of engineers. It means, fewer engineers works slower. And more engineers work faster.

Code: [Select]
?(_progress > _maxprogress) : goto "done"
If progress reach the maximum, it's time to finish the loop and do our final job...

Code: [Select]
?(count units _engineers == 0) : exit
If all engineers are dead, script end to save the CPU.

Code: [Select]
{ deleteVehicle _x} foreach _fences
Delete the fences/roadblocks.

Code: [Select]
~2
{_x enableAI "MOVE"} foreach units _engineers
Wait two second and then engineers can move (can follow their path...).
Fix bayonet!

Offline mathias_eichinger

  • Missions Depot
  • Administrator
  • *****
  • I'm a llama!
Re: Infantry cutting wire fences?
« Reply #24 on: 23 Apr 2008, 16:59:08 »
Hi Rommel and Bardosy!

Both of your methods work, we can consider this problem solved! Thank you very much for your time and effort.

Cheers

Mathias

Offline Captain

  • Members
  • *
Re: Infantry cutting wire fences?
« Reply #25 on: 23 Apr 2008, 23:21:25 »
Rather than having to name the section of fence can the script be modified to just detect fence objects nearby?

 :confused: