Countdown Wac Script
Posted: Fri Sep 17, 2010 3:14 pm
This is a handy WAC script that shows how many items are remaining as they are destroyed. Country Joe sent this to us during his brief absence and I've used it several times.
There are 2 parts to this script. In the first part you show the SSNs of the items that you want the countdown to apply to. The second part sets up the output to the game screen and shows the countdown.
In the script shown below . . . set(v1,7), the "v1" is the same as saying "List 1". The number 7 is the number of items within the List.
if never() then
set(v1,7)
endif
If ssndead(487) and never() then (This says that if this SSN is dead or destroyed . . .)
dec(v1) (then subtract from List 1)
endif
If ssndead(488) and never () then
dec(v1)
endif
If ssndead(489) and never () then
dec(v1)
endif
If ssndead(490) and never () then
dec(v1)
endif
If ssndead(491) and never () then
dec(v1)
endif
If ssndead(492) and never () then
dec(v1)
endif
If ssndead(493) and never () then
dec(v1)
endif
This is the second script that outputs the info to the game screen. You'll note that the first line of the script shows (v1,6) instead of (v1,7). That's because this script kicks in after the first item has been destroyed.
if eq(v1,6) and never() then
consol("Remaining COMMUNICATION TOWERS: 6")
endif
if eq(v1,5) and never() then
consol("Remaining COMMUNICATION TOWERS: 5")
endif
if eq(v1,4) and never() then
consol("Remaining COMMUNICATION TOWERS: 4")
endif
if eq(v1,3) and never() then
consol("Remaining COMMUNICATION TOWERS: 3")
endif
if eq(v1,2) and never() then
consol("Remaining COMMUNICATION TOWERS: 2")
endif
if eq(v1,1) and never() then
consol("Remaining COMMUNICATION TOWERS: 1")
endif
if eq(v1,0) and never() then
consol("Remaining COMMUNICATION TOWERS: 0")
endif
You can set up as many countdown lists as you want simply by changing the List number (v#). For Example, if you wanted a list for 10 weapon crates . . .
if eq(V2,10)
or 8 Weapon Emplacements . . .
if eq(v3,8)
and so one.
Just follow the format shown in the first list to set them up.
There are 2 parts to this script. In the first part you show the SSNs of the items that you want the countdown to apply to. The second part sets up the output to the game screen and shows the countdown.
In the script shown below . . . set(v1,7), the "v1" is the same as saying "List 1". The number 7 is the number of items within the List.
if never() then
set(v1,7)
endif
If ssndead(487) and never() then (This says that if this SSN is dead or destroyed . . .)
dec(v1) (then subtract from List 1)
endif
If ssndead(488) and never () then
dec(v1)
endif
If ssndead(489) and never () then
dec(v1)
endif
If ssndead(490) and never () then
dec(v1)
endif
If ssndead(491) and never () then
dec(v1)
endif
If ssndead(492) and never () then
dec(v1)
endif
If ssndead(493) and never () then
dec(v1)
endif
This is the second script that outputs the info to the game screen. You'll note that the first line of the script shows (v1,6) instead of (v1,7). That's because this script kicks in after the first item has been destroyed.
if eq(v1,6) and never() then
consol("Remaining COMMUNICATION TOWERS: 6")
endif
if eq(v1,5) and never() then
consol("Remaining COMMUNICATION TOWERS: 5")
endif
if eq(v1,4) and never() then
consol("Remaining COMMUNICATION TOWERS: 4")
endif
if eq(v1,3) and never() then
consol("Remaining COMMUNICATION TOWERS: 3")
endif
if eq(v1,2) and never() then
consol("Remaining COMMUNICATION TOWERS: 2")
endif
if eq(v1,1) and never() then
consol("Remaining COMMUNICATION TOWERS: 1")
endif
if eq(v1,0) and never() then
consol("Remaining COMMUNICATION TOWERS: 0")
endif
You can set up as many countdown lists as you want simply by changing the List number (v#). For Example, if you wanted a list for 10 weapon crates . . .
if eq(V2,10)
or 8 Weapon Emplacements . . .
if eq(v3,8)
and so one.
Just follow the format shown in the first list to set them up.