• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[JASS] how can i do this trigger in jass?

Status
Not open for further replies.
Level 1
Joined
Jun 1, 2006
Messages
2
how can i do this trigger in jass?
gds
Code:
    Events
        Player - Player 2 (Blue) types a chat message containing -level as An exact match
        Player - Player 1 (Red) types a chat message containing -level as An exact match
        Player - Player 3 (Teal) types a chat message containing -level as An exact match
        Player - Player 4 (Purple) types a chat message containing -level as An exact match
        Player - Player 5 (Yellow) types a chat message containing -level as An exact match
        Player - Player 6 (Orange) types a chat message containing -level as An exact match
        Player - Player 7 (Green) types a chat message containing -level as An exact match
        Player - Player 8 (Pink) types a chat message containing -level as An exact match
    Conditions
    Actions
        Hero - Set (Triggering unit) Hero-level to 75, Hide level-up graphics
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
except that that sucks.

or, you could just code it in JASS in the first place

JASS:
function Level_Actions takes nothing returns nothing
    local group g = CreateGroup()
    local unit u
    call GroupEnumUnitsOfPlayer( g, GetTriggerPlayer(), null )
    loop
        set u = FirstOfGroup( g )
        exitwhen u == null
        call SetHeroLevel( u, 75 )
        call GroupRemoveUnit( g, u )
    endloop
    call DestroyGroup( g )
    set g = null
endfunction

function InitTrig_Level takes nothing returns nothing
    local integer index = 0
    set gg_trg_Level = CreateTrigger()
    loop
        exitwhen index > 7
        call TriggerRegisterEnterChatString( gg_trg_Level, Player(index), "-level" )//please note that this line may be wrong, as i rarely use this function ( the name might even be wrong ), and i am on vacation, therefore having no access to a JASS editor
        set index = index + 1
    endloop
    call TriggerAddAction( gg_trg_Level, function Level_Actions )
endfunction
 
Status
Not open for further replies.
Top