Forum Jump :

Author Message


Posts: 1057
Rank:


Level: Member

Country: en
Location: 15 Bajo Valor Road, Everon, Sahrani.
Occupation: Air Training Corps, Airsoft + College.
Age: 26
In-game name: grimfist

 
#1 Posted at 2008-12-30 21:36        
     
i am trying to get a trigger that counts civilian deaths in an area, if more than 15 civvies die, i want the trigger to do - end 3. but i cant seem to find anything. thanks in advance.

Also - does any1 know where i can get sand storm weather scripts? i opened up some afgan missions but the number of scripts was overwhelming and i couldnt find it. ty. BTW it cant use addons. must be scripted.ty.

This post was edited by Big (2008-12-31 17:02, ago)


Author Message


Posts: 20630
Rank:


Level: Super Admin

Country: nl
Location: The Netherlands
Occupation:
Age: 43
In-game name: Foxhound

 
#2 Posted at 2008-12-30 21:57        
     
What you need is the start number of civi's and a trigger which checks if the current number of civi's is 15 less than that number.

I used the search and found some topics.......no idea if they are usefull but I am sure it will give you the idea how to do it:
http://www.armaholic.com/forums.php?m=posts&p=25595#25595
http://www.armaholic.com/forums.php?m=posts&p=10197#10197
http://www.armaholic.com/forums.php?m=posts&p=3998#3998


As for the sandstorm, no idea. You probably will have to work with particles but I am no good with those.

Visit my family webshop desteigerhoutshop.nl.

Advertisement


Author Message


Posts: 1057
Rank:


Level: Member

Country: en
Location: 15 Bajo Valor Road, Everon, Sahrani.
Occupation: Air Training Corps, Airsoft + College.
Age: 26
In-game name: grimfist

 
#3 Posted at 2008-12-30 22:23        
     
Mc Script:
To detect if there were 10 or less surviving enemies, set up a trigger covering your area, make it "SIDE" present repeatedly, where "SIDE" will be the enemy side. Now down in the Condition line, remove "this" and write in:
Code:
count thislist <= 10
and in the on activation what should happen, i.e.:

Code:
{removeallweapons _} foreach thislist; {_x setcaptive TRUE} foreach thislist; {_x move getmarkerpos "MARKERNAME"} foreach thislist


Myke out

i thing i need to work with this, but say if i have 400 civies i need to detect if there is 385.

and use this to say 'O dear u killed a civilian - thats collateral damage'


Author Message


Posts: 20630
Rank:


Level: Super Admin

Country: nl
Location: The Netherlands
Occupation:
Age: 43
In-game name: Foxhound

 
#4 Posted at 2008-12-30 22:43        
     
[quote]Grimfist : count thislist <= 10

i need to detect if there is 385.[/quote]


:wtf

count thislist <= 385

Visit my family webshop desteigerhoutshop.nl.

Author Message


Posts: 1057
Rank:


Level: Member

Country: en
Location: 15 Bajo Valor Road, Everon, Sahrani.
Occupation: Air Training Corps, Airsoft + College.
Age: 26
In-game name: grimfist

 
#5 Posted at 2008-12-30 22:50        
     
It works, horray, now just need to count all the civilians... TY fox
and display the message.

so when a civ is killed - u get warning.

This post was edited by Grimfist (2008-12-30 22:58, ago)


Author Message


Posts: 1057
Rank:


Level: Member

Country: en
Location: 15 Bajo Valor Road, Everon, Sahrani.
Occupation: Air Training Corps, Airsoft + College.
Age: 26
In-game name: grimfist

 
#6 Posted at 2008-12-31 16:54        
     
O YEA!

; ***************************************************
; Sand Storm Script 1.0 
; by Toadeater (toadeater@wolfenet.com)
; ***************************************************
; 
; Usage: Activate from the player's init line, or a script:
; [playername] exec "duster.sqs"
;
; If you want to use this script in a cutscene, attach it to a camera, otherwise
; the "sand" won't be seen from the camera's point of view.
; E.g. [camera1] exec "duster.sqs"
;
; Turn off by setting the "dustoff" variable to true via a trigger or script, etc.
; dustoff = true

dustoff = false
_target = _this select 0
? _target == player : _target = player
_delay = .1

; Change to a higher # if you want more randomization

_wind = 2

; Particle color values, change to match island/weather, e.g. snow.
; _r = red, _g = green, _b = blue

_r = .100
_g = .100
_b = .100

;_r = .38
;_g = .36
;_b = .25

; The other settings pretty much depend on each other, change them at your own risk.

_delay = 0.15
_strength = .15
_distance = 500
_size2 = 100
_dirx = 0
_diry = 0
_dirz = 3
_height = 0
_spin = -33

#loop

? (speed _target) > 1 : _delay = .05
? (speed _target) < 2 : _delay = .1
? (speed _target) > 1 : _distance = 25
? (speed _target) < 2 : _distance = 15
;? (getpos _target select 2) > 20 : goto "wait"
? _spin > 33 : _spin = -33
_spin = _spin + (random 13)
_size1 = 20 + (random 60)

_dir180 = (getdir _target) + 181 + _spin
_pos4 = [((getPos _target) select 0) + _distance * (sin _dir180), (getPos _target select 1) + _distance * (cos _dir180), _height]
drop ["\ca\data\cl_basic","","Billboard",3,2,_pos4,[_dirx,_diry,_dirz],0,25,19,0,[_size1,_size2],[[_r,_g,_b,_strength],[_r,_g,_b,_strength],[_r,_g,_b,_strength],[_r,_g,_b,_strength]],[0],.5,_wind,"","",""]
~_delay
_dir90 = (getdir _target) + 91 + _spin
_pos2 = [((getPos _target) select 0) + _distance * (sin _dir90), (getPos _target select 1) + _distance * (cos _dir90),_height]
drop ["\ca\data\cl_basic","","Billboard",3,2,_pos2,[_dirx,_diry,_dirz],0,25,19,0,[_size1,_size2],[[_r,_g,_b,_strength],[0.2,0.2,.1,_strength],[_r,_g,_b,_strength],[0.21,0.2,0.1,_strength]],[0],.5,_wind,"","",""]
~_delay
_dir270 = (getdir _target) + 271 + _spin
_pos6 = [((getPos _target) select 0) + _distance * (sin _dir270), (getPos _target select 1) + _distance * (cos _dir270),_height]
drop ["\ca\data\cl_basic","","Billboard",3,2,_pos6,[_dirx,_diry,_dirz],0,25,19,0,[_size1,_size2],[[_r,_g,_b,_strength],[_r,_g,_b,_strength],[_r,_g,_b,_strength],[_r,_g,_b,_strength]],[0],.5,_wind,"","",""]
~_delay
_dir45 = (getdir _target) + 45 + _spin
_pos1 = [(getPos _target select 0) + _distance * (sin _dir45), (getPos _target select 1) + _distance * (cos _dir45), _height]
drop ["\ca\data\cl_basic","","Billboard",3,2,_pos1,[_dirx,_diry,_dirz],0,25,19,0,[_size1,_size2],[[_r,_g,_b,_strength],[_r,_g,_b,_strength],[_r,_g,_b,_strength],[_r,_g,_b,_strength]],[0],.5,_wind,"","",""]
~_delay
_dir315 = (getdir _target) + 315 + _spin
_pos7 = [((getPos _target) select 0) + _distance * (sin _dir315), (getPos _target select 1) + _distance * (cos _dir315),_height]
drop ["\ca\data\cl_basic","","Billboard",3,2,_pos7,[_dirx,_diry,_dirz],0,25,19,0,[_size1,_size2],[[_r,_g,_b,_strength],[_r,_g,_b,_strength],[_r,_g,_b,_strength],[_r,_g,_b,_strength]],[0],.5,_wind,"","",""]
~_delay
_dir135 = (getdir _target) + 135 + _spin
_pos3 = [((getPos _target) select 0) + _distance * (sin _dir135), (getPos _target select 1) + _distance * (cos _dir135),_height]
drop ["\ca\data\cl_basic","","Billboard",3,2,_pos3,[_dirx,_diry,_dirz],0,25,19,0,[_size1,_size2],[[_r,_g,_b,_strength],[_r,_g,_b,_strength],[_r,_g,_b,_strength],[_r,_g,_b,_strength]],[0],.5,_wind,"","",""]
~_delay
_dir225 = (getdir _target) + 225 + _spin
_pos5 = [((getPos _target) select 0) + _distance * (sin _dir225), (getPos _target select 1) + _distance * (cos _dir225),_height]
drop ["\ca\data\cl_basic","","Billboard",3,2,_pos5,[_dirx,_diry,_dirz],0,25,19,0,[_size1,_size2],[[_r,_g,_b,_strength],[_r,_g,_b,_strength],[_r,_g,_b,_strength],[_r,_g,_b,_strength]],[0],.5,_wind,"","",""]
~_delay
_pos = [(getPos _target select 0) + _distance * sin (getdir _target), (getPos _target select 1) + _distance * cos (getdir _target),_height]
drop ["\ca\data\cl_basic","","Billboard",3,2,_pos,[0,0,3],0,40,35,0,[_size1,_size2],[[_r,_g,_b,_strength],[_r,_g,_b,_strength],[_r,_g,_b,_strength],[_r,_g,_b,_strength]],[0],.5,_wind,"","",""]
~_delay

? dustoff : goto "exit"

Goto "loop"

#wait

?  (getpos _target select 2) < 20 : goto "loop"
? dustoff : goto "exit"
~1
goto "wait"

#Exit


Author Message


Posts: 1057
Rank:


Level: Member

Country: en
Location: 15 Bajo Valor Road, Everon, Sahrani.
Occupation: Air Training Corps, Airsoft + College.
Age: 26
In-game name: grimfist

 
#7 Posted at 2009-01-24 13:01        
     
count thislist <= 385
this isnt working, i tried but it counts other stuff, is there a script that detects if 15 civilian (ACE Iraqis) have died, or how hard would it be to make one?


Author Message


Posts: 20630
Rank:


Level: Super Admin

Country: nl
Location: The Netherlands
Occupation:
Age: 43
In-game name: Foxhound

 
#8 Posted at 2009-01-25 10:13        
     
Since you are counting "thislist" it counts all units of the specified side inside the trigger.
You could always add an array to your script where you add all the units (give them a name) you have in your mission, count the number of alive units from that array at mission start and count it every now and than during the mission. If the count is 15 less than the start count 15 civi's have died.

You could also use the killed eventhandler for this. Check if a civi was just killed and if so check if there are 15 less civis alive in the array compared to start of the mission.

Or, maybe there is a much easier way:
isKindOf
    If true (check if kind is the same as the vehicleclass for the civi) increment a score, when the score is 15 it means 15 civi's have died.
countType
    Add a trigger covering your whole mission area and check now and than if the count of those civi's (refer to their vehicleclass) is 15 less than for example a count at start of the mission.

Visit my family webshop desteigerhoutshop.nl.

Author Message

Thief  



Posts: 4
Rank:


Level: Member

Country: us
Location:
Occupation:
Age:
In-game name:

 
#9 Posted at 2009-02-19 15:43        
     
Using some of the information above, I was able to get my missions to end by linking the trigger to the group. Once the civilians dropped below a certain amount, the force end worked.

Hopefully this will save someone that is learning things like me some time.


Author Message


Posts: 1057
Rank:


Level: Member

Country: en
Location: 15 Bajo Valor Road, Everon, Sahrani.
Occupation: Air Training Corps, Airsoft + College.
Age: 26
In-game name: grimfist

 
#10 Posted at 2009-02-19 15:55        
     
Well i still cant get this darned thing to work, i have lots of different groups of civvies. and i cant write scripts (some small ones) so im still stuck.


Author Message


Posts: 1057
Rank:


Level: Member

Country: en
Location: 15 Bajo Valor Road, Everon, Sahrani.
Occupation: Air Training Corps, Airsoft + College.
Age: 26
In-game name: grimfist

 
#11 Posted at 2009-02-19 18:01        
     
All solved now.

Wolfrug (OPFEC.com):
Multiplayer issue
What Trexian is saying is that you should attach an eventHandler to each civilian, and then count up a global variable (which you need to make global in scope by some magic command that I don't know since I don't live in MP land). For instance, in each civilian's init field write:

Code:
this addeventhandler ["killed", {GRIM_CivKilled = GRIM_CivKilled + 1; publicVariable "GRIM_CivKilled"}];

in the Init.sqf or someplace else you've then created the global variable GRIM_CivKilled by putting

Code:
GRIM_CivKilled = 0;

in it. Then, in the END#2 trigger, you've simply got the Condition:
Code:
GRIM_CivKilled > 14

(more than 14 civilians killed).

Should do it

Wolfrug out.