• Inactive
    December 16, 2018 at 11:28 #2619

    Commands are missing in the list above and also in the following.

    Source: OLDMAN on Godfathers Nile Mapmakers > Mapmaking FAQ’s  (this forum is no longer available, it was the best mapmaking forum out there and all is lost! or is it?)

    Unfortunately I only stored the basic commands, so here’s what I have…

    WAC Flow Control (basic statements)
    IF triggers THEN actions ENDIF
    IF [ifname] triggers THEN actions ENDIF (optional named if)
    IF triggers THEN actions ELSE actions ENDIF
    IF triggers THEN actions ELSEIF triggers THEN actions ENDIF
    PLOOP actions(player) END
    GLOOP group actions(item) END
    DOSEQ actions NEXT actions [NEXT actions..] ENDDO
    DORND actions NEXT actions [NEXT actions..] ENDDO // work like DOSEQ (not random) !!
    IF triggers ENTER actions ENDIF (triggers on first true)
    IF triggers LEAVE actions ENDIF (triggers after last true)
    The order of operations in WAC scripting is left to right.
    Any lines preceded with a semicolon or text after two forward slashes is considered as a comment. Examples: ; this is a comment about this script if Past(60) then //This is the events name
    (usually defaults to //New Event The syntax should look something like this: – (parens, line returns and tabbing are all optional)
    if trigger1(params) and trigger2(params) then //Event Name or Comment
    Example 1.)
    Door triggered by area trigger.
    If I want to open doors in group 12 the first time I enter area 1501 then I use
    if location(1501) and never() then
    endifExample 2.)
    Time lapsed rain and random thunder and lightning.
    (Originally posted by Sal UK and modified by Kip Kilagan -PR-) Explanation:
    After 90 seconds has passed it will begin to rain and go overcast, both reaching full strength 20 seconds later. It also sets variable 1 to 1 with “set (v1,1)”. After another 90 seconds (180 seconds into the round) the rain and overcast will die away to nothing over 20 seconds and the map will brighten up again. Also the variable 1 is now set to 2. Only if variable 1 is set to 1 will the last part of the script activate… causing thunder and lighting randomly once in every 30 times.
    if ontick(90) then
    endifif ontick(180) then
    endifIf eq(v1,1) and random(30) then
    endifExample 3.)
    Co-op win/lose condition after killing of a certain AI or objects. Remember many things can trigger a win condition not just the death of an object or AI. // ssndead is a bad choice on vanish objects like bots !
    If SSN 10001 is dead and SSN 10002 then Win1 = JO wins otherwise if AI 10003 dies then WIn2 = Rebels win would look like this:
    if ssndead(10001) and ssndead(10002) and never() then
    if ssndead(10003) and never() then
    ————————————— WAC Language Commands
    Nestable flow control
    ENDIF Boolean logic
    OR Function modifier
    ! Note: At this moment in time NILE doesn’t like it if you use nested events, it would apear that you need to use seperate events for most things to work. You can use the following to randomize between nested action in a conditional IF event.
    dornd = do the following nested action randomly (don’t work anymore -> work like doseq)
    doseq = do the following nested actions sequentially
    next = used between the actions
    enddo = used to close the do statement, comes just before the last endif of the event. Example:
    If elapse(120) and random(5) then
    rain(30, 30) // Light Rain
    set(v1, 1)
    rain(100, 30) // Hard Rain
    set(v1, 2)
    rain(60, 30) // Medium Rain
    set(v1, 3)
    rain(0, 30) // No Rain
    set(v1, 4)
    endif————————————————————————- VARIABLES & IMMEDIATES
    Note:- A variable can always be used as an immediate “STRING” immediate string value
    # immediate decimal number
    v# v0 to v255 these are game variables you can set or have set, these are cleared at start of each mission
    G# G0 to vG11 these are global variables,( these are not cleared during link !! no more)
    M# Music Script Variable 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)
    result current return/accumulator value (mostly for debug)
    SS_SoundSet immediate soundset name
    sSoundSet immediate soundset name (alternate syntax)
    wind used by SWING, FLICKER, and particle wind2
    health player’s health/hp value
    mana player’s mana
    player payer’s variable
    item group variable
    rnd random’s variable
    ticks number of seconds into game 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
    # == # -> eq(#,#)
    # != # -> ne(#,#)
    # < # -> lt(#,#)
    # > # -> gt(#,#)
    #<=# -> le(#,#)
    # >= # -> ge(#,#)
    # -> true(#)
    !# -> false(#) VARIABLE MODIFY
    Note: The “v” is followed by the number you want as the variable (0 to 256). Ensure variables don’t clash with each other.
    Also when incrementing variables remember to set the variable to a value prior to the first increment.
    set (v,#) set variable # to # // v = #
    add (v,#) add # to variable # // v = v + #
    sub (v,#) subtract # from variable #, clamp at 0 // v = v – #
    inc (v) add 1 to var // v = v + 1
    dec (v) subtract 1 from var, clamp at 0 // v = v – 1
    Note:- # param can be number or variable. chain(#) true if previous IF statement has fired # ammount of seconds ago and previouse is closed and chain(#) isn’t nesting in an closed condition.
    dooropen(#) true if group # has door open
    elapse(#) true if # seconds have past since last activated / first time it fire immediately !
    groupdead(#) true if entire group is dead
    groupalive(#) true if anyone in group is alive
    location(#) true if you are at that location
    meride(#) true if you are riding SSN # (Only works as a trigger for the host of the game)
    never() true if event has never fired / fire only once !
    outside() true if you are not in a blink box
    past(#) true if past # seconds into game / after # sec. its always true
    ontick(#) true if exact # seconds into game / fire only once !
    previous() true if previous event has fired?
    random(#) randomly true if rnd 1 in # times
    ssnalive(#) true if ssn is alive
    ssndead(#) true if ssn is dead / isn’t true if an object doesn’t exist anymore
    ssnloc(#,#) true if vehical or person is in location
    ssnnearssn(#,#,#) true if SSN is near SSN within # distance
    ssnride(#) true if organic is standing on SSN
    tod(#) true if time of day equals # (000 to 2359)
    waveready() true if no talking going on / be carefull on dedicated servers !
    ————————————————————————— EVENTS
    Note:- # param can be number or variable CO-OP Win/Lose Conditions:
    win(#) # is set to 0,1 or 2 these are draw,JO win and Rebels win respectively.
    lose(#) gives the opposite result as win Weather/Enviroment Events:
    ammorain(ammo) rain down ammo # near player (only host sees/hears the fx, but clients still lose health/die
    fxrain(fx) rain down effect # somewhere near player
    farflash produce a far away flash of lightning & thunder
    flash produce a flash of lightning & thunder
    fogdist(#) sets fogdist to # meters (same as set(fog,#)
    fogtype(#) set fog type 0=fog, 1=haze, 2=haze wall, 3=fog wall
    gain(#,#,#) sets the brightness of the whole scene
    overcast(#,#) produce an overcast (strength, time it takes to get to that strength)
    quake(#) earthquake for # 10th of a seconds
    rain(#,#) produce rain (ammount of rain, time it takes to get to that ammount) (Don’t use FXRAIN)
    skyspeed(#) set the sky speed to #
    tod(#:#) set the time of day to #:# eg: tod(12:00)
    wind (#,#) produce wind sounds ect (strength, time it takes to get to that strength) Text Output Events:
    consol(“text”) output text to consol
    consol#(“text”,#) output text to consol w/#
    text(“text”) output text to chat
    text#(“text”,#) output text to chat w/# Various Events:
    ammo2tgt(ammo,tgt) create ammo # at target # (ex. ammo2tgt ammo_rocket 1)
    closedoors(group) close doors in group #
    fx2tgt(fx,tgt) create fx # at target # (ex. fx2tgt effect_lightning 1)
    forceanim(anim) forces all organics into anim slot (debug only)
    GroupMax(group, maxengage) set max engage distance
    GroupMin(group, minengage) set min engage distance
    GroupAtt(group, maxattack) set max engage distance
    GtoWP(group, wp) redirect Group to WP list
    Gkill(grp) kill group #
    killSSN(ssn) kill SSN #
    opendoors(group) open doors in group #
    Gremove(grp) remove group # without a trace
    removeSSN(ssn) remove SSN # without a trace
    sound(sSSNAME, dist, head) plays soundset at distance(meters) and heading(angle)
    sound2tgt(ss,tgt) create ssoundset # at target # (ex. sound2tgt sSoundSet 1)
    SSNanim(ssn, anim_move) sets the ssn to ADM move slot
    SSNatt(ssn, maxattack) set max engage distance
    SSNmax(ssn, maxengage) set max engage distance
    SSNmin(ssn, minengage) set min engage distance
    SSNspawn(#,#) set SSN # to spawn # ammount of times, 0=do not respawn
    SSNtoWP(ssn, wp) redirect SSN to WP list
    SSNwave(ssn, “wave.wav”, dist) plays wave file from the mouth of the ssn with max dist to be heard
    ssncspd(ssn,speed) set ssn to combat speed of # kph (seems to only work for vehicles not AI themselves)
    ssnpspd(ssn,speed) set ssn to patrol speed of # kph (seems to only work for vehicles not AI themselves)
    targetfx(tgt) create med particle fx at target #
    teleport(grp,tgt) teleport group # to target #
    telessn(ssn, tgt) teleport SSN # to target #
    tod(#) set time of day to # (00:00 to 23:59)
    wave(“wav file”) play wav file

Latest 10 Maps

AW2 – Firebase

AW2 – Amicabe

AW2 – Mission

AW2 – Dune – Part 1

AW2 – White World

AW2 – Wippsteert

AW2 – Battle at Shambala Falls

AW2 – Airport Takedown v3.14

AW2 – Lumberyard XMAS

AW2 – Zombies Christmas

Log In



Lost password?