Go Back   Novahq.net Forum > Games > Delta Force

Delta Force Anything to do with the Delta Force series of games, DF1, DF2, LW, TFD, BHD, DFX, AF etc.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-07-2018, 05:01 PM
Oscarmike247 is offline Oscarmike247
Oscarmike247's Avatar
Registered User

Join Date: Feb 2018
Posts: 229

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.
Reply With Quote
  #2  
Old 05-07-2018, 07:28 PM
Guest001 is offline Guest001
Registered User

Join Date: Aug 2008
Posts: 4,971

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...
Reply With Quote
  #3  
Old 05-07-2018, 09:21 PM
Oscarmike247 is offline Oscarmike247
Oscarmike247's Avatar
Registered User

Join Date: Feb 2018
Posts: 229

Quote:
Originally Posted by stompem View Post
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...

I didnt mention that these enemies have infinite respawns. I expiremented with group lost x units. With no luck.
Reply With Quote
  #4  
Old 05-08-2018, 04:30 AM
Guest001 is offline Guest001
Registered User

Join Date: Aug 2008
Posts: 4,971

OK then, I guess you could try ssn not alive and not in area(#)
Reply With Quote
  #5  
Old 05-08-2018, 04:48 AM
Guest001 is offline Guest001
Registered User

Join Date: Aug 2008
Posts: 4,971

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
Reply With Quote
  #6  
Old 05-08-2018, 04:52 AM
Guest001 is offline Guest001
Registered User

Join Date: Aug 2008
Posts: 4,971

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.

Reply With Quote
  #7  
Old 05-08-2018, 05:48 AM
Oscarmike247 is offline Oscarmike247
Oscarmike247's Avatar
Registered User

Join Date: Feb 2018
Posts: 229

Quote:
Originally Posted by stompem View Post
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.

I thought about something similar. The problem i found with teleporting dead ai is while it does bring them back to life, they wont shoot at anything after being teleported.

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.
Reply With Quote
  #8  
Old 05-08-2018, 07:00 AM
Oscarmike247 is offline Oscarmike247
Oscarmike247's Avatar
Registered User

Join Date: Feb 2018
Posts: 229

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.
Reply With Quote
  #9  
Old 06-05-2018, 12:42 AM
Guest001 is offline Guest001
Registered User

Join Date: Aug 2008
Posts: 4,971

Further to that idea, perhaps you can set AI groups and individuals to variables as well?
Reply With Quote
  #10  
Old 06-05-2018, 09:24 AM
Oscarmike247 is offline Oscarmike247
Oscarmike247's Avatar
Registered User

Join Date: Feb 2018
Posts: 229

Quote:
Originally Posted by stompem View Post
Further to that idea, perhaps you can set AI groups and individuals to variables as well?
Explain?
Reply With Quote
  #11  
Old 06-06-2018, 10:04 AM
Guest001 is offline Guest001
Registered User

Join Date: Aug 2008
Posts: 4,971

Quote:
Originally Posted by Oscarmike247 View Post
Explain?
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.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 12:14 AM.




Powered by vBulletin®