PDA

View Full Version : I Need help with wac files



Israeli Rambo
06-10-2003, 07:11 AM
i makeing a maps on sp mode
now i dont know how use on wac flie i dont know the commands at all i dont know the language
somebody have a guide or something like that?!?
TNX

Bluetiereign
06-10-2003, 10:18 PM
The only 'guides' that you need are the wac files found in your localres.pff file.

Get FwO Raven's Pff Utility here (http://www.checkpointdelta.net/cgi-bin/db.cgi?db=file&uid=default&Game=C4&view_records=1&sb=1&so=ascend&ID=*&mh=100).

Create a folder somewhere you can find it and call it WACS. Open the localres.pff file and filter for WAC files. When they have loaded - left click and drag down the page to select them all - right click and chose extract them to the folder you created.

The wac files open in notepad and are easy to view and study. Try the Game and Kyle wac files first. If you have any further questions - feel free to post them.

Israeli Rambo
06-11-2003, 09:36 AM
tank u i wil try this

DizAsTeR !
08-03-2003, 09:39 PM
Ok, Instead of trying to extract them and fnind out what to do I extracted one for you. This is a small tutorial from mission 10.


;wac file - nestable IF/THEN/ELSE/ENDIF boolean logic
;
;WAC post directory w:\vp\program\wac - commands listed in GAME.WAC
;WAC debug screen under shift-F12, numlock arrows to select and scroll
;
;GLOBAL WAC is GAME.WAC (executed first)
;
;MISSION WAC is misname.WAC (executed second)
;
;Left to Right order of operations
;
;---WAC LANGUAGE COMMANDS
;nestable flow control
; IF THEN ELSE ENDIF
;boolean logic
; AND OR XOR
;function modifier
; NOT
;comments
; ; /
;
;Syntax - parens optional, line returns and tabbing optional
;
; if trigger1(params) and trigger2(params) then
; event1(params)
; event2(params)
; endif
;
;Example
;
; I want to open doors in group 12 the first time I enter area 1501
;
; if location(1501) and never() then
; opendoors(12)
; endif
;

;---VARIABLES & IMMEDIATES (a variable can always be used as an immediate)
;"STRING" immediate string value
;# immediate decimal number
;anim_move immediate equate from ADM file
;ammo_name immediate ammo name (ex. ammo2tgt ammo_rocket 1)
;fx_fxname immediate effect name (ex. fxrain fx_effect_lightning)
;effect_name immediate effect name (ex. fxrain effect_lightning)
;SS_SoundSet immediate soundset name
;sSoundSet immediate soundset name (alternate syntax)
;V# V0 to v511 game variables, cleared at start of mission
;G# G0 to vG11 global variables, not cleared during link
;M# Music Script Variable
;result current return/accumulator value (mostly for debug)
;ticks number of seconds into game
;wind used by SWING, FLICKER, and particle wind2
;health player's health/hp value
;mana player's mana
;neartype the type of the nearest enemy (from items.def dialog)
;neardist thedistance to the nearest organic
;nearmove the anim move of the nearest organic (setable)
;nearid the unique dcb/id of the nearest organic
;neartid the id of the organic's target or 0 if no target
;nearblind
;nearflying
;nearguard
;nearSSN
;nearWP
;nearGroup
;nearHP

;---TRIGGERS (# param can be number or variable)
;random(#) randomly true 1 in # times
;elapse(#) true if # seconds have past since last activated
;chain(#) true if previous IF fired # seconds ago
;link(#1,#2) true if IF #1 away from current IF fired #2 seconds ago
; link(-1,10) is same as chain(10)
;past(#) true if past # seconds into game
;never() true if event has never fired
;location(#) true if you are at that location
;outside() true if you are not in a blink box
;waveready() true if no talking going on
;groupdead(#) true if entire group is dead
;groupalive(#) true if anyone in group is alive
;ssndead(#) true if ssn is dead
;ssnalive(#) true if ssn is alive
;ssnride(#) true if organic is standing on SSN
;ssnloc(#,#) true if vehical or person is in location
;dooropen(#) true if group # has door open
;
;---VARIABLE COMPARE
;eq(#,#) true if #==#
;ne(#,#) true if #!=#
;lt(#,#) true if #<#
;gt(#,#) true if #>#
;le(#,#) true if #<=#
;ge(#,#) true if #>=#
;true(#) true if #!=0
;false(#) true if #==0
;
;---VARIABLE MODIFY
;set(var,#) set var to #
;add(var,#) add # to var
;sub(var,#) subtract # from var, clamp at 0
;inc(var) add 1 to var
;dec(var) subtract 1 from var, clamp at 0

;---EVENTS (# param can be number or variable)
;forceanim(anim) forces all organics into anim slot (debug only)
;report("text") pop-up debug report window
;report#("text",#) pop-up debug report window with number
;text("text") output text to chat - right side
;text#("text",#) output text to chat w/# - right side
;consol("text") output text to consol - left side
;consol#("text",#) output text to consol w/# - left side
;
;flash produce a flash of lightning & thunder
;farflash produce a far away flash of lightning & thunder
;quake(#) earthquake for # 10th of a seconds
;
;sun(#,#,#) sets sun rgb ENV override
;sky(#,#,#) sets sky rgb
;ground(#,#,#) sets ground rgb
;ceiling(#,#,#) sets ceiling rgb
;floor(#,#,#) sets floor rgb (inside ground)
;lightning(#,#,#) sets the color of the lightning
;cloud(#,#,#) sets the cloud color
;gain(#,#,#) sets the brightness of the whole scene
;
;fogcolor(#,#,#) set fogcolor to R,G,B, changes in 1 second
;fog(#,#,#) set fogcolor to R,G,B (same as fogcolor)
;fogtype(#) set fog type 0=fog, 1=haze, 2=haze wall, 3=fog wall
;fogdist(#) sets fogdist to # meters (same as set(fog,#)
;
;sound(sSSNAME, dist, head) plays soundset at distance(meters) and heading(bangle)
;
;nearwave("wave.wav", dist) plays wave file from the mouth of the nearest enemy with max dist to be heard
;nearanim(anim_move) sets the nearest enemy to ADM move slot
;SSNwave(ssn, "wave.wav", dist) plays wave file from the mouth of the ssn with max dist to be heard
;SSNanim(ssn, anim_move) sets the ssn to ADM move slot
;
;SSNmax(ssn, maxengage) set max engage
;SSNmin(ssn, minengage) set min engage
;SSNatt(ssn, maxattack) set max engage
;GroupMax(group, maxengage) set max engage
;GroupMin(group, minengage) set min engage
;GroupAtt(group, maxattack) set max engage
;remove(grp) remove group # without a trace
;kill(grp) kill group #
;removeSSN(ssn) remove SSN # without a trace
;killSSN(ssn) kill SSN #
;teleport(grp,tgt) teleport group # to target #
;telessn(ssn, tgt) teleport SSN # to target #
;targetfx(tgt) create med particle fx at target #
;sound2tgt(ss,tgt) create ssoundset # at target # (ex. sound2tgt sSoundSet 1)
;ammo2tgt(ammo,tgt) create ammo # at target # (ex. ammo2tgt ammo_rocket 1)
;fx2tgt(fx,tgt) create fx # at target # (ex. fx2tgt effect_lightning 1)
;opendoors(group) open doors in group #
;closedoors(group) close doors in group #
;SSNtoWP(ssn, wp) redirect SSN to WP list
;GtoWP(group, wp) redirect Group to WP list
;ammorain(ammo) rain down ammo # somewhere near player
;fxrain(fx) rain down effect # somewhere near player
;ssncspd(ssn,speed) set ssn to combat speed of #
;ssnpspd(ssn,speed) set ssn to patrol speed of #




If you have any questions im all ears. I'm a bit new but I know alot. It is hard to read on this Forum so you can download it. I put an attachment on here.

:ar15:

[Edited on 8-4-2003 by DizAsTeR !]

LadyHawke
08-04-2003, 05:25 AM
DizAsTeR,

Welcome to CPD! :xyxwave.gif:

And, THANK YOU for your BHD map editing input. We can always use more BHD expertise in the forums... :thumb: