Joined: Tue Dec 30 2003 Location: Lincolnshire England Posts: 2080
Player rides Getting intel from a pc by some one sitting at the chair
if ssnride(***) and never then wave("alarm1.wav",40) text " " text "Accessing computer.........." text "" endif
replace the *** with the ssn number of the chair.
A countdown clock
if never() then set(v10,59)//sec set(v11,60)//min endif
if elapse(1) then dec(v10) if eq(v10,0) then dec(v11) set(v10,59) endif consol("Time left till Princess dies!") consol#("Minutes!",v11) consol#("Seconds!",v10) endif
Disabling vehicles The example below stops ppl using a helo by passing a variable (v8,1) from the game.
if eq(v8, 1) and never then wave("Alarm4.wav", 10) text " " text "I've lost hydrolics guys" text " " endif
if eq(v8, 1) and Chain (2) then wave("Alarm4.wav", 10) text " " text "Were going down brace for impact!!!" text " " DisableSSN(***) endif
Jump survive - enable bgs and humans to jump from helos and tall buildings
if never() and (true(HUMANS)) then //New Event gain(-10,-10,-10) fallmps = (1000000) endif A target counter
/---------- target counter ----------
if never() then set(v10,5) //remaining set at 5 targets here set(v11,0) //destroyed endif
if true(v10) then
if never() and (ssndead(***)) then wave("javlock.wav",50) dec(v10) inc(v11) consol#("targets destroyed:",v11) consol#("Targets left:",v10) endif
if never() and (ssndead(***)) then wave("javlock.wav",50) dec(v10) inc(v11) consol#("targets destroyed:",v11) consol#("Targets left:",v10) endif
if never() and (ssndead(***)) then wave("javlock.wav",50) dec(v10) inc(v11) consol#("targets destroyed:",v11) consol#("Targets left:",v10) endif
if never() and (ssndead(***)) then wave("javlock.wav",50) dec(v10) inc(v11) consol#("targets destroyed:",v11) consol#("Targets left:",v10) endif
if never() and (ssndead(***)) then wave("javlock.wav",50) dec(v10) inc(v11) consol#("targets destroyed:",v11) consol#("Targets left:",v10) endif
if Elapse(100) then consol#("Number of targets remaining:",v10) endif endif
//------------------------------------------------ if false(v10) then if never() and () then consol(" ") consol("All targets destroyed !! ") wave("alarm1.wav",40) text " " text "Area is clear of targets" text "Path clear to the north" endif
as before replace the *** with the ssn number of your target.
Website info
if past(40) and random(130) then //Web site stuff text("Visit www.hardmaps.com") wave("alarm6.wav",50) endif
if past(30) and random(100) then //reminder text("") text("Reminder! Press SPACE for last PSP") text("Press G key for goals and I key for info") endif
Joined: Tue Dec 30 2003 Location: Lincolnshire England Posts: 2080
Only works with Nile How to script group death in wac, it only shows a message if a member of the group targeted is dead/destroyed.
if !v222 then
GLOOP xxxx;group name
if ssnalive(item) then
inc(v222)
endif
END
if v223 != v222 then
consol#(" group name left :",v222)
v223 = v222
endif
if v222 then
v222 = 0
else
action when group dead
endif
endif
....as for now I only know how to put it in the left bottom corner under the chatt line. So anyone want to help me out what command in Wac I need to use? Or it's topsecret maybe;)! Thx in advance
Joined: Fri Mar 21 2014 Location: Banks of the Styx Posts: 130
Corrections in BOLD
*HmS*Trevor wrote ...
if false(v10) then if never() and () then consol(" ") consol("All targets destroyed !! ") wave("alarm1.wav",40) text " " text "Area is clear of targets" text "Path clear to the north" endif
if false v10 and never then consol "All targets destroyed !! " wave "alarm1.wav" text "Area is clear of targets" text "Path clear to the north" text "" endif
*HmS*Trevor wrote ...
Jump survive - enable bgs and humans to jump from helos and tall buildings
if never() and (true(HUMANS)) then //New Event gain(-10,-10,-10) fallmps = (1000000) endif
if never then fallmps = 30 endif
*HmS*Trevor wrote ...
A target counter
if never() then set(v10,5) //remaining set at 5 targets here set(v11,0) //destroyed endif
if true(v10) then
if never() and (ssndead(***)) then wave("javlock.wav",50) dec(v10) inc(v11) consol#("targets destroyed:",v11) consol#("Targets left:",v10) endif
if never() and (ssndead(***)) then wave("javlock.wav",50) dec(v10) inc(v11) consol#("targets destroyed:",v11) consol#("Targets left:",v10) endif
if never() and (ssndead(***)) then wave("javlock.wav",50) dec(v10) inc(v11) consol#("targets destroyed:",v11) consol#("Targets left:",v10) endif
if never() and (ssndead(***)) then wave("javlock.wav",50) dec(v10) inc(v11) consol#("targets destroyed:",v11) consol#("Targets left:",v10) endif
if never() and (ssndead(***)) then wave("javlock.wav",50) dec(v10) inc(v11) consol#("targets destroyed:",v11) consol#("Targets left:",v10) endif
if Elapse(100) then consol#("Number of targets remaining:",v10) endif endif
//------------------------------------------------ if false(v10) then if never() and () then consol(" ") consol("All targets destroyed !! ") wave("alarm1.wav",40) text " " text "Area is clear of targets" text "Path clear to the north" endif[/i]
In this example I will place all targets at Alpha in one group called TARGETS1 I will use variable 1 to trigger first objective of the mission.
Target counter
if never then v1 = 0 v2 = 36 endif
if {#condition} and never then v1 = 1 wave "promote.wav" endif
if v1 == 1 then GLOOP TARGETS1 if ssndead item enter removessn item sub v2,1 endif END consol "<cFF0000>First objective: <-co>" consol "<cFF0000>Destroy all targets at Alpha!<-co>" consol# "<cFF0000>Targets: <-co>",v2 endif → Better use CONSOL output so players can still use the TEXT field for in game communication!!!
if v2 == 0 and never then v1 = 2 consol "<cFF0000>All targets destroyed! Good job, soldier!<-co>" consol "<cFF0000>Proceed to your next objective! <-co>" consol "<cFF0000>Press "i" for info.<-co>" wave "happy1.wav" endif → If you want to reuse this variable for targets at the next zone, use ENTER instead of 'and never then'