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-16-2018, 07:02 AM
Oscarmike247 is offline Oscarmike247
Oscarmike247's Avatar
Registered User

Join Date: Feb 2018
Posts: 229

Wac limits? :( (DFX/JO)

So i am experiencing sys error crashing the game and it seems to be linked to the WAC. Im not aware of any WAC limits, but this has me baffled.

What ive gathered so far, the problem seems to stem from the looping wac scripts and med events. My map requires many looping wac scripts (does not contain "never ()") to test the trigger conditions repeatedly throughout the game. my theory is that theres a limit to how many triggers and actions can be tested on a loop at once.

Heres some map specs and what i know so far...

Singleplayer
WAC size 37kb
1600+ WAC lines
160+ med events
700 decorations
Less than 30 AI

The problem:

1) If i add one more trigger or action to any looping WAC script (does not contain "never ()") then it will cause a sys error during map load.

2) It does not matter what type of trigger or action.

3) it does not crash if the action or trigger is added to a non looping script (containing "never ()").

4) adding new triggers or actions to looping med events causes the same error.

5) game crashes right before the map is completely loaded.


Has anyone heard of such an issue? Any ideas?

Last edited by Oscarmike247; 05-16-2018 at 09:26 AM.
Reply With Quote
  #2  
Old 05-17-2018, 05:55 PM
Guest001 is offline Guest001
Registered User

Join Date: Aug 2008
Posts: 4,971

WAC meltdown is usually caused by invalid objects in the map, incorrect values for variables, wac statements with incorrect wording (syntax).

Also as you can imagine one action can cancel out another action, this is especially so when looping commands are still running and other actions are called at the same instance.
Reply With Quote
  #3  
Old 05-17-2018, 06:19 PM
Guest001 is offline Guest001
Registered User

Join Date: Aug 2008
Posts: 4,971

If you're not doing so already, try using variables to switch, I rely heavily on them to build huge wac files, in this example the wac is well over 1000 lines.

Code:
;Operation Twilight

//	                                ***VARS***
if never() then
	set(v8,0) // control
	set(v9,0) // Friendly Zodiac Crews (SET BELOW)
	set(v10,0) // Friendly Infils
	set(v11,0) // Friendly Zodiac (SET BELOW)
	set(v15,0) // Final Bombardment
	set(v16,0) // Final Bombardment
	set(v17,0) // Weather1
	set(v18,0) // Enemy Mass Attack (SET BELOW)
	set(v20,0) // HUD - Unit Assists (SET BELOW)
	set(v21,0) // HUD - Casualties (SET BELOW)
	set(v27,0) // Weather2
	set(v28,0) // Bombing
	set(v30,0) // Control
	set(v34,0) // Enemy group 34
	set(v35,0) // Enemy group 35 (SET BELOW)
	set(v36,0) // Enemy group 36
	set(v37,0) // Enemy group 37
	set(v37,0) // infil Enemy group 39
	set(v40,0) // Control infil effects
	set(v41,0) // Control infil flags
	set(v50,0) // HUD - Team Rating / clamp at 0 if <= 1 (SET BELOW)
	set(v51,0) // Tgts 5
	set(v52,0) // Tgts 12, 13, 14, 15, 16 (SET BELOW)
	set(v61,0) // Control
	set(v70,0) // ka52 (SET BELOW)
	set(v71,0) // BTR (SET BELOW)
	set(v80,0) // Group Casualties / respawning
	set(v81,0) // Group Casualties / respawning
	set(v82,0) // Group Casualties / respawning	
	set(v83,0) // Group Casualties / respawning	
	set(v84,0) // Group Casualties / respawning	
	set(v85,0) // Group Casualties / respawning
	set(v90,0) // Group Casualties / respawning
endif
//	                                ***INIT***
if past(1) and never() then
	fx2tgt (Effect_FxFire2mF,3)
	ssnhp(61,200) // first enemy
	hidessn(98) //  flag A
	hidessn(99) //  flag B
	hidessn(100) // flag C
	hidessn(101) // flag D
	hidessn(102) // flag E
	hidessn(103) // flag F
	hidessn(104) // flag G
	hidessn(2) // Group39 Start
	hidessn(3)
	hidessn(4)
	hidessn(37)
	hidessn(38) // Group39 End
	hidessn(49) // Group40 Zodiac Enemy Infil Start
	hidessn(50)
	hidessn(51)
	hidessn(52)
	hidessn(53)
	hidessn(54)
	hidessn(55)
	hidessn(56)
	hidessn(57)
	hidessn(58) // Group40 Zodiac Enemy Infil End
endif
Reply With Quote
  #4  
Old 05-17-2018, 06:37 PM
Guest001 is offline Guest001
Registered User

Join Date: Aug 2008
Posts: 4,971

Here is a small section triggering events using the vars.
Note that actions for v18 are set in the MEd event editor.

Code:
// ***MassAttack***
if past(200) and eq(v9,6) and never() then
set(v18,1)
endif

// ***ShootersInTheHills***
//
if area(27) and lt(v50,0) and not eq(v34,2) or eq(v34,3) and never() then
	set(v34,1)
endif
if previous() and waveready() and never() then
	wave("ALPH554.wav")
	text("Shooters In The Hills!")
endif
//
if area(27) and eq(v50,0) and not eq(v34,1) or eq(v34,3) and never() then
	set(v34,2)
endif
if previous() and waveready() and never() then
	wave("ALPH554.wav")
	text("Shooters In The Hills!")
endif
//
if area(27) and gt(v50,0) and not eq(v34,1) or eq(v34,2) and never() then
	set(v34,3)
endif
if previous() and waveready() and never() then
	wave("ALPH554.wav")
	text("Shooters In The Hills!")
endif
Reply With Quote
  #5  
Old 05-17-2018, 06:58 PM
Guest001 is offline Guest001
Registered User

Join Date: Aug 2008
Posts: 4,971

Now we get to always on events

Code:
// ***RANDOM***
if past(1) and elapse(12) and random(2) then
	set(v27,0) // weather on
	set(v28,1) // bombing off
endif
if past(14) and elapse(12) and random(2) then
	set(v27,1) // weather off
	set(v28,0) // bombing on
endif

if eq(v27,1) then
	if elapse(120) and random(2) then
		rain(40,20)
		overcast(40,20)
		set(v17,1)
	end
	if chain(60) and random(2) then
		rain(0,20)
		overcast(0,20)
		set(v17,0)
	end
endif

if eq(v28,1) then
if elapse(6) and random(16) and waveready() then
	wave("xpLgF4.wav")
	quake(14)
end
if chain(0) then
	lightning(50,5,5)
	flash()	
end
endif
if eq(v17,1) then
	if past(1) and elapse(4) and random(30) then
		lightning(100,30,30)
		flash()
	end
endif

// ***CHOOSE***
if area(15) and never() then
	if lt(v50,0) then 
		set(v64,1)
		elseif eq(v50,0) then  
			set(v64,2)
			elseif gt(v50,0) then  
				set(v64,3)
			end
		end
	end
endif
// var 64 2 area 16
if area(16) and never() then
	if lt(v50,0) then 
		set(v64,4)
		elseif eq(v50,0) then  
			set(v64,5)
			elseif gt(v50,0) then  
				set(v64,6)
			end
		end
	end
endif
// var 64 3 area 17
if area(17) and never() then
	if lt(v50,0) then 
		set(v64,7)
		elseif eq(v50,0) then  
			set(v64,8)
			elseif gt(v50,0) then  
				set(v64,9)
			end
		end
	end
endif

// ***REACTIONS***
if ssnalive(96) then
	if ssnarea(96,18) or ssnnearssn(96,121,30) then
		ssncspd(96,4)
		ssnpspd(96,4)
		else
		ssncspd(96,36)
		ssnpspd(96,36)
		end
	end
endif
// EZodiac ssn27
if ssnalive(27) and eq(v18,1) then
	if ssnarea(27,14) then
		ssncspd(27,26)
		ssnpspd(27,16)
		else
		ssncspd(27,46)
		ssnpspd(27,36)
		end
	end
endif
// Ferryboat ssn33
if ssnalive(33) and eq(v18,1) then
	if ssnarea(33,25) or ssnarea(33,26) or ssnnearssn(33,29,30) then
		ssncspd(33,4)
		ssnpspd(33,4)
		else
		ssncspd(33,36)
		ssnpspd(33,36)
		end
	end
endif
// Eboat2 ssn29
if ssnalive(29) and eq(v18,1) then
	if ssnarea(29,14) then
		ssncspd(29,22)
		ssnpspd(29,12)
		else
		ssncspd(29,46)
		ssnpspd(29,36)
		end
	end
endif

// ***DIVERSION***
;sniper under dock
if ssnalive(72) and ssnwounded(72) then
	SSNtoWP(72,15,0)
endif
;first enemy
if ssnalive(61) and ssnwounded(61) then
	SSNtoWP(61,20,0)
endif
Reply With Quote
  #6  
Old 05-17-2018, 08:01 PM
Oscarmike247 is offline Oscarmike247
Oscarmike247's Avatar
Registered User

Join Date: Feb 2018
Posts: 229

Quote:
Originally Posted by stompem View Post
If you're not doing so already, try using variables to switch, I rely heavily on them to build huge wac files, in this example the wac is well over 1000 lines.

Code:
;Operation Twilight

//	                                ***VARS***
if never() then
	set(v8,0) // control
	set(v9,0) // Friendly Zodiac Crews (SET BELOW)
	set(v10,0) // Friendly Infils
	set(v11,0) // Friendly Zodiac (SET BELOW)
	set(v15,0) // Final Bombardment
	set(v16,0) // Final Bombardment
	set(v17,0) // Weather1
	set(v18,0) // Enemy Mass Attack (SET BELOW)
	set(v20,0) // HUD - Unit Assists (SET BELOW)
	set(v21,0) // HUD - Casualties (SET BELOW)
	set(v27,0) // Weather2
	set(v28,0) // Bombing
	set(v30,0) // Control
	set(v34,0) // Enemy group 34
	set(v35,0) // Enemy group 35 (SET BELOW)
	set(v36,0) // Enemy group 36
	set(v37,0) // Enemy group 37
	set(v37,0) // infil Enemy group 39
	set(v40,0) // Control infil effects
	set(v41,0) // Control infil flags
	set(v50,0) // HUD - Team Rating / clamp at 0 if <= 1 (SET BELOW)
	set(v51,0) // Tgts 5
	set(v52,0) // Tgts 12, 13, 14, 15, 16 (SET BELOW)
	set(v61,0) // Control
	set(v70,0) // ka52 (SET BELOW)
	set(v71,0) // BTR (SET BELOW)
	set(v80,0) // Group Casualties / respawning
	set(v81,0) // Group Casualties / respawning
	set(v82,0) // Group Casualties / respawning	
	set(v83,0) // Group Casualties / respawning	
	set(v84,0) // Group Casualties / respawning	
	set(v85,0) // Group Casualties / respawning
	set(v90,0) // Group Casualties / respawning
endif
//	                                ***INIT***
if past(1) and never() then
	fx2tgt (Effect_FxFire2mF,3)
	ssnhp(61,200) // first enemy
	hidessn(98) //  flag A
	hidessn(99) //  flag B
	hidessn(100) // flag C
	hidessn(101) // flag D
	hidessn(102) // flag E
	hidessn(103) // flag F
	hidessn(104) // flag G
	hidessn(2) // Group39 Start
	hidessn(3)
	hidessn(4)
	hidessn(37)
	hidessn(38) // Group39 End
	hidessn(49) // Group40 Zodiac Enemy Infil Start
	hidessn(50)
	hidessn(51)
	hidessn(52)
	hidessn(53)
	hidessn(54)
	hidessn(55)
	hidessn(56)
	hidessn(57)
	hidessn(58) // Group40 Zodiac Enemy Infil End
endif
Thanks for the replies. Yes i use variables for a host of different triggers and switches.

Initially, i was thinking the same. There must be a conflict in some of the loops or something. I looked through everything and i don't see where a conflict could have occurred, but the map is very complex using several scripts, events, and variables. So it is hard to tell

If this was the case though, then why would the error occur no matter where I put a command, or what kind of command it is for that matter? It will only happen if you added something to a looping trigger.

Even if you added one more simple looping script like...

If past(1) then
Text ("test")
Endif

... the error would occur.


I have removed a few looping scripts that were necessary and it has fixed the issue for now. But i feel that it will return once i add more stuff to the WAC.

Last edited by Oscarmike247; 05-17-2018 at 08:40 PM.
Reply With Quote
  #7  
Old 05-19-2018, 08:14 AM
Oscarmike247 is offline Oscarmike247
Oscarmike247's Avatar
Registered User

Join Date: Feb 2018
Posts: 229

So, once again i have run into the error. (I knew it would happen again once i added a certain number of looping scripts)

Im trying to get to the bottom of this. I experimented and pasted my wac into a new blank map and it caused the same error. And again if i remove a looping script (doesnt matter which one) it will fix it.

This suggests that there is nothing in my maps events or objects causing the error. Its all in the WAC.
Reply With Quote
  #8  
Old 05-20-2018, 05:02 AM
Guest001 is offline Guest001
Registered User

Join Date: Aug 2008
Posts: 4,971

Quote:
Originally Posted by Oscarmike247 View Post
So, once again i have run into the error. (I knew it would happen again once i added a certain number of looping scripts)

Im trying to get to the bottom of this. I experimented and pasted my wac into a new blank map and it caused the same error. And again if i remove a looping script (doesnt matter which one) it will fix it.

This suggests that there is nothing in my maps events or objects causing the error. Its all in the WAC.
That's hard to judge from here, especially with such limited data and no working example to go on, this problem has come up before and been overcome, so it may appear as you say but it could still be caused by script, med, windows etc.
Reply With Quote
  #9  
Old 05-20-2018, 09:39 AM
Oscarmike247 is offline Oscarmike247
Oscarmike247's Avatar
Registered User

Join Date: Feb 2018
Posts: 229

Quote:
Originally Posted by stompem View Post
That's hard to judge from here, especially with such limited data and no working example to go on, this problem has come up before and been overcome, so it may appear as you say but it could still be caused by script, med, windows etc.
Well i seem to have singled out the problem to actions with looping scripts.

I added a new looped script with not action...

If eq(v60, 1) then
Endif


... the game runs fine.


But as soon as you add an action, even something as simple as text ("testing") it will crash. But if you remove 1 action from another looped script it will work again.
Reply With Quote
  #10  
Old 05-20-2018, 01:12 PM
Guest001 is offline Guest001
Registered User

Join Date: Aug 2008
Posts: 4,971

Quote:
Originally Posted by Oscarmike247 View Post
Well i seem to have singled out the problem to actions with looping scripts.

I added a new looped script with not action...

If eq(v60, 1) then
Endif


... the game runs fine.


But as soon as you add an action, even something as simple as text ("testing") it will crash. But if you remove 1 action from another looped script it will work again.
Like I said before it may only look that way because other wacs in the past have failed in similar fashion with far fewer instructions in them than this one.

Also leaving out never() is not really looping in the strictest sense of the word, instructions in the same stream may be executing in the same instance, shorten your script and leave as many vars switched off until needed, use else, chain, link etc to exclude or reduce incidences of them queuing too long or firing whilst other variables are operating.
Reply With Quote
  #11  
Old 05-20-2018, 02:51 PM
Guest001 is offline Guest001
Registered User

Join Date: Aug 2008
Posts: 4,971

Quote:
Originally Posted by Oscarmike247 View Post

Even if you added one more simple looping script like...

If past(1) then
Text ("test")
Endif

... the error would occur.
I was working on a better example for you when I noticed your script would display the text every second.

If past(1) then
Text ("test")
Endif


try the following script with a delay of 7 seconds between the text display.

Code:
if past(1) and elapse(7) then
text("test")
endif
or try this one with as many text outputs needed in a given scenario, I've put 3 here using your example variable 60.
Trigger the values 1 to 3 from elsewhere in the wac or med.

Code:
if not eq(v60,0) then
 if eq(v60,1) and never() then
  text("Test1")
  set(v60,0)
 else
 if eq(v60,2) and never() then
  text("Test2")
  set(v60,0)
 else
  if eq(v60,3) and never() then
  text("Test3")
  set(v60,0)
 end
 end
 end
endif
alternatively

Code:
if not eq(v60,0) then
 if eq(v60,1) and never() then
  text("Test1")
  set(v60,0)
 end
else
 if eq(v60,2) and never() then
  text("Test2")
  set(v60,0)
 end
else
  if eq(v60,3) and never() then
  text("Test3")
  set(v60,0)
  end
endif
PLEASE NOTE: I don't have access to the dfx and JOE mission editors at the moment

Last edited by Guest001; 05-20-2018 at 03:03 PM.
Reply With Quote
  #12  
Old 05-20-2018, 03:01 PM
Guest001 is offline Guest001
Registered User

Join Date: Aug 2008
Posts: 4,971

Maybe even this may work?
Code:
if not eq(v60,0) then
 if eq(v60,1) and never() then
  text("Test1")
  set(v60,0)
 end
 if eq(v60,2) and never() then
  text("Test2")
  set(v60,0)
 end
 if eq(v60,3) and never() then
  text("Test3")
  set(v60,0)
 end
endif
Reply With Quote
  #13  
Old 05-20-2018, 05:06 PM
Oscarmike247 is offline Oscarmike247
Oscarmike247's Avatar
Registered User

Join Date: Feb 2018
Posts: 229

Quote:
Originally Posted by stompem View Post
I was working on a better example for you when I noticed your script would display the text every second.

If past(1) then
Text ("test")
Endif


try the following script with a delay of 7 seconds between the text display.

Code:
if past(1) and elapse(7) then
text("test")
endif
or try this one with as many text outputs needed in a given scenario, I've put 3 here using your example variable 60.
Trigger the values 1 to 3 from elsewhere in the wac or med.

Code:
if not eq(v60,0) then
 if eq(v60,1) and never() then
  text("Test1")
  set(v60,0)
 else
 if eq(v60,2) and never() then
  text("Test2")
  set(v60,0)
 else
  if eq(v60,3) and never() then
  text("Test3")
  set(v60,0)
 end
 end
 end
endif
alternatively

Code:
if not eq(v60,0) then
 if eq(v60,1) and never() then
  text("Test1")
  set(v60,0)
 end
else
 if eq(v60,2) and never() then
  text("Test2")
  set(v60,0)
 end
else
  if eq(v60,3) and never() then
  text("Test3")
  set(v60,0)
  end
endif
PLEASE NOTE: I don't have access to the dfx and JOE mission editors at the moment
Thanks, but the example I used was not a script from the map, I was just making the point that if you create a script without "never()" and include an action ( ANY action), even one as simple as text, it will crash the game. but if you include no action, it runs fine. doesn't matter what trigger you're using, as soon as you include an action it crashes.

Here are some examples of scripts from my maps WAC...


Code:
;===v Player kills counter v===

;Pre mission med event sets v16 to 1.

if piskills(v16) then
	inc(V16)
	inc(V17)
endif

;===^ Player kills counter ^===

;Weather script
if Eq(v14, 1) and elapse(V59) and random(9) then
	dornd
		Flash()
		gain(60,80,230)
		next
		FarFlash()
		gain(10,25,100)
		next
		SS2SSN(Thunder, 10000)
	enddo
endif

;Battle difficulty levels
if eq(v14, 1) and lt(v17, 5) then //Teir 1
Rain(60)
Gsetaccuracy(8, 65)
Set(V59, 9) //Weather script: Frequency
	elseif eq(v14, 1) and ge(v17, 5) and lt(v17, 10) then //Teir 2
	Rain(60)
	Gsetaccuracy(8, 75)
	Set(V59, 8) //Weather script: Frequency
		elseif eq(v14, 1) and ge(v17, 10) and lt(v17, 15) and elapse(3) then //Teir 3
		ammoarea(Ammo_60mm_mortar, 8)
		Rain(75)
		Gsetaccuracy(8, 85)
		Set(V59, 7) //Weather script: Frequency
			elseif eq(v14, 1) and ge(v17, 15) and elapse(1) then //Teir 4
			ammoarea(Ammo_60mm_mortar, 8)
			ammoarea(Ammo_60mm_mortar, 8)
			Rain(100)
			Gsetaccuracy(8, 100)
			Set(V59, 6) //Weather script: Frequency
			endif
		endif
	endif
endif
In this script, Reach 20 kill points to win (1 point per kill). Player will lose 3 points every time he dies. Level difficulty progresses through 4 levels of difficulty based on points. if you lose points, the difficulty will revert back as well.

Last edited by Oscarmike247; 05-20-2018 at 05:28 PM.
Reply With Quote
  #14  
Old 05-20-2018, 09:36 PM
Guest001 is offline Guest001
Registered User

Join Date: Aug 2008
Posts: 4,971

Ok
Reply With Quote
  #15  
Old 05-26-2018, 06:56 AM
Oscarmike247 is offline Oscarmike247
Oscarmike247's Avatar
Registered User

Join Date: Feb 2018
Posts: 229

Reckon it has anything to do with using a 64 bit OS? Not sure why that would make a difference, but its just a thought.
Reply With Quote
  #16  
Old 05-27-2018, 06:20 AM
Guest001 is offline Guest001
Registered User

Join Date: Aug 2008
Posts: 4,971

Quote:
Originally Posted by Oscarmike247 View Post
Reckon it has anything to do with using a 64 bit OS? Not sure why that would make a difference, but its just a thought.
It's a 32 bit program but based on the general understanding of things, I doubt it's anything relevant to this issue.
Reply With Quote
  #17  
Old 05-28-2018, 01:25 AM
Guest001 is offline Guest001
Registered User

Join Date: Aug 2008
Posts: 4,971

Extrapolating on what you've put here...

Perhaps you could try this to circumvent v16 = 1 on init.




Code:
// v16 ;counter
// v17 ;helper

if piskills(v16) then
	add(v16, 1)
	if gt(v16, 1) then
		add(v17, 1)
	end
endif
Reply With Quote
  #18  
Old 05-28-2018, 09:38 AM
Oscarmike247 is offline Oscarmike247
Oscarmike247's Avatar
Registered User

Join Date: Feb 2018
Posts: 229

Quote:
Originally Posted by stompem View Post
Extrapolating on what you've put here...

Perhaps you could try this to circumvent v16 = 1 on init.




Code:
// v16 ;counter
// v17 ;helper

if piskills(v16) then
	add(v16, 1)
	if gt(v16, 1) then
		add(v17, 1)
	end
endif
V16 should be the helper. V17 is the actual counter displayed to the player.


Im not where i can test this at the moment, but wouldnt v17 continue to climb as soon as v16 is gt 1? So if you get one kill, the counter (v17) would just keep increasing every second.

Last edited by Oscarmike247; 05-28-2018 at 09:56 AM.
Reply With Quote
  #19  
Old 05-28-2018, 04:15 PM
Guest001 is offline Guest001
Registered User

Join Date: Aug 2008
Posts: 4,971

Quote:
Originally Posted by Oscarmike247 View Post
V16 should be the helper. V17 is the actual counter displayed to the player.


Im not where i can test this at the moment, but wouldnt v17 continue to climb as soon as v16 is gt 1? So if you get one kill, the counter (v17) would just keep increasing every second.
No v17 won't keep counting, I think the reason is piskills is an action not a condition.

Also your difficulty script looks like it only counts upwards.

Try this to lower the difficulty one level below the current one on death.



Code:
if piskills(v16) then
	add(v16, 1)
	if gt(v16, 1) then
		add(v17, 1) ; helper display kills
		add(v19, 1) ; helper difficulty
	end
endif

if not ssnalive(10000) then
	if le(v18, 1) then
		set(v19, 0)
	end
	if eq(v18,2) then
		set(v19, 5)
	end
	if eq(v18,3) then
		set(v19, 10)
	end
else
	if eq(v14,1) and lt(v19, 5) then
		rain(60)
		gsetaccuracy 8,65
		set(v59, 9)
		set(v18, 0)
	end
	if eq(v14,1) and ge(v19, 5) and lt(v19, 10) then
		rain(60)
		gsetaccuracy 8,75
		set(v59, 8)
		set(v18, 1)
	end
	if eq(v14,1) and ge(v19, 10) and lt(v19, 15) and elapse(3) then
		rain(75)
		gsetaccuracy 8,85
		set(v59, 7)
		set(v18, 2)
		ammoarea(Ammo_60mm_mortar, 8)
	end
	if eq(v14,1) and ge(v19, 15) and elapse(1) then
		rain(100)
		gsetaccuracy 8,100
		set(v59, 6)
		set(v18, 3)
		ammoarea(Ammo_60mm_mortar, 8)
		ammoarea(Ammo_60mm_mortar, 8)
	end
end
endif

Last edited by Guest001; 05-28-2018 at 04:31 PM.
Reply With Quote
  #20  
Old 05-28-2018, 04:26 PM
Guest001 is offline Guest001
Registered User

Join Date: Aug 2008
Posts: 4,971

Here's a simple alternative - I made this while back for another map but the var numbers shouldn't matter and you can drop it straight in just change the group and add weather etc...

For difficulty the ai just alternates between 2 standards.

Code:
;by stompem 2017
;Respawn AI if they kill themselves.
;if past(1) and gt(v223,0) and groupdead(0) then
;	GroupSpawn 0,1
;endif
// Inits
if never() then
	set(v223, 10) ; win target
endif
// Player
if piskills(v220) then
	add(v220, 1)
	add(v225, 1)
if gt(v220, 1) then
	add(v221, 1)
	sub(v223, 1)
end
if gt(v223,0) and groupdead(0) then
	GroupSpawn 0,1
end
endif
// Display
if not eq(v223,0) and elapse(7) then
	text# "Player Score",v221
	text# "Enemy Score",v222
	text# "Enemy Left",v223
endif
// AI
if not ssnalive(10000) then
	add(v224, 1)
	set(v225, 1)
if eq(v222, 10) and never() then
	win (0)
end
else
	set(v224, 0)
endif
if eq(v224, 1) then
	add(v222, 1)
endif
if lt(v225, 2) then
	accuracyspread = 10
	Gsetaccuracy 0,50,85
	GroupAtt 0,16
endif
if gt(v225, 1) then
	accuracyspread = 5
	Gsetaccuracy 0,100,100
	GroupAtt 0,320
endif
if never() and eq(v223, 0) then
	text "   GAME OVER"
	text# "Final Score",v221
	text# "Enemy Score",v222
endif
if chain(7) and never() then
	win (1)
endif
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 08:37 AM.




Powered by vBulletin®