|
Delta Force Anything to do with the Delta Force series of games, DF1, DF2, LW, TFD, BHD, DFX, AF etc. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
||
|
Is there any way to do this? (JO/DFX)
I've got a large group of enemies in a map. I need Variable X to increase by 1 for every enemy killed.
Sounds simple. But how? I've been experimenting with ways to get this to work with no luck. I feel like there's a simple solution right in front of me that I'm not seeing. |
#2
|
||
|
Try...
If group lost x units false - Reset Event or in the wac If ssndead(#) and never() then Use: set(v#,#) add(v#,#) sub(v#,#) inc(v#,#) dec(v#,#) Can be done with health - not alive etc... |
#3
|
|||
|
Quote:
I didnt mention that these enemies have infinite respawns. I expiremented with group lost x units. With no luck. |
#4
|
||
|
OK then, I guess you could try ssn not alive and not in area(#)
|
#5
|
||
|
I just thought this up on paper so it's untried, IE I don't know if this will work past the first kill or not...
Code:
ploop if onptick(1) then set(v1,0) set(v2,10) end if piskills(1) and pisteam(1) and never() then set(v1,1) set(v2,9) end if piskills(2) and pisteam(1) and never() then set(v1,2) set(v2,8) end if piskills(3) and pisteam(1) and never() then set(v1,3) set(v2,7) end end |
#6
|
||
|
You could also count when AI respawn (NOTE* for ssndead - use not alive) in a certain area, disappear from an area or are teleported to an area.
|
#7
|
|||
|
Quote:
Here is my idea. The only issue is that ill have to do this using med events and it will take a lot of them (2 events per Ai). Use 2 events and a marker at the bots respawn point. Event 1: if ssn 'bot' is further than 4m of ssn 'spawn point' and ssn 'bot' is not alive. Then increase var X by 1. And reset event 2 Event 2: if ssn 'bot' is within 4m of ssn 'spawn point' and ssn alive 'bot' then reset event 1 When the bot dies it will increase var x by 1, when it respawns it will reset the event to increase var x the next time it dies. Only problem is i have 20 of these bots. Meaning ill need to make 40 events. Ugh Ill play around with your ploop idea too. Thanks stomp. |
#8
|
||
|
Figured it out. Its actually much more simple than we thought.
Make a pre-mission event to set var1 to 1. Use wac script. If piskills(v1) then Inc (v1) Inc (v2) Endif V1 is number of kills needed to trigger which will always stay 1 ahead of current kills. V2 will reflect actual number of player kills. If you need to reset or set number of player kills, simply set v2 to 0 or whatever number you need. Just tested and it works perfectly. Last edited by Oscarmike247; 05-08-2018 at 03:04 PM. |
#9
|
||
|
Further to that idea, perhaps you can set AI groups and individuals to variables as well?
|
#10
|
||
|
Explain?
|
#11
|
||
|
Just a thought...
Say you could assign group 6 as v6 and group 7 as v7 etc etc. Then perhaps each bot in the group could be assigned a value from that variable, so in group 6 the first ssn in numerical order would v6,1 the second v6,2 etc. Maybe the game will do it automatically, but one idea would be that as bots spawn, die and respawn the variable could go up and down, count deaths and who is dead in statements using equation like commands. In any event you may end up with smaller scripts and greater control may be gained. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | Search this Thread |
Display Modes | |
|
|