OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: netta1234 on 11 Apr 2004, 02:41:51
-
hey all i nead another script for my mission
its you must destroy 4 Tanks when you have destroyed 1 it will auto say 3 tanks left it sound a bit n00bish
-
Group the tanks like this in the leaders init field:
tankgroup = group this; tankgroupnumber = 4
And in a trigger type this:
cond: count units tankgroup<tankgroupnumber
on act: hint format ["%1 Tanks Left", count units tankgroup]; tankgroupnumber = tankgroupnumber - 1
Assuming you don't want the tanks in the same group, group the tanks with the trigger and replace the above on act field with:
on act: hint format ["%1 Tanks Left", count units thislist]; tankgroupnumber = tankgroupnumber - 1
Or something like that. My OFP editing skills are a bit rusty so it will probably not work(or there's an easier way)but you get the pic?
:beat: *Gets Shot* :beat:
-
I think you would prefer the second part to be:
tankgroupnumber = count units tankgroup
or
tankgroupnumber=count units thislist
As you don't know how many tanks were actually killed.
-
Uh, yea, that would be better. When I wrote the old post I hadn't been editing for a few months. :)
:beat: *Gets Shot* :beat: