Warcraft III resources & community, 2003–2006 · archived

Trigger/Quest Help?

6 posts
#1

Trigger/Quest Help?

Alright so on my new map, I need Quests for ONE player only, other players won't get it.
But I have no idea where to find this and im pretty new to JASS so I can't figure out if it would be in there what I have, but I'm not sure if im WAY off or just have to change a couple of things -

function Trig_HW_Bard_1_Func003C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'H009' ) ) then
return false
endif
return true
endfunction

function Trig_HW_Bard_1_Conditions takes nothing returns boolean
if ( not ( GetOrderTargetUnit() == gg_unit_n00S_0013 ) ) then
return false
endif
if ( not Trig_HW_Bard_1_Func003C() ) then
return false
endif
return true
endfunction

function Trig_HW_Bard_1_Actions takes nothing returns nothing
call CreateQuestBJ( bj_QUESTTYPE_REQ_DISCOVERED, "TRIGSTR_597", "TRIGSTR_598", "ReplaceableTextures\\CommandButtons\\BTNAmbush.blp" )
endfunction

//===========================================================================
function InitTrig_HW_Bard_1 takes nothing returns nothing
set gg_trg_HW_Bard_1 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_HW_Bard_1, EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER )
call TriggerAddCondition( gg_trg_HW_Bard_1, Condition( function Trig_HW_Bard_1_Conditions ) )
call TriggerAddAction( gg_trg_HW_Bard_1, function Trig_HW_Bard_1_Actions )
endfunction
#2
Cyruland im pretty new to JASS


you mean you're pretty new to Convert To Custom Text buttons?

anyways, i think GetLocalPlayer should work
#3
Alright, thanks.
#4
Sounds easily done in GUI.


player1only
    Events
        Map initialization
    Conditions
    Actions
        Set playercount = 0
        For each (Integer A) from 1 to 12, do (If (((Player((Integer A))) slot status) Equal to Is playing) then do (Set playercount = (playercount + 1)) else do (Do nothing))
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                playercount Greater than 1
            Then - Actions
                Trigger - Turn off (player 1 trigger only)
                ***your whole list of player 1 only triggers***
            Else - Actions
                Do nothing


*edit* Oh I forgot, add "Slot is not equal to computer" in AND condition along with "is playing" too
#5
'setplayercount=0'
What kind of variable or where to find in 'Actions'?
#6
2 things

1st, still, why did u use Convert To Custom Text? JASSers dont use war3map.wts :P

2nd, Haloboy, all that is doing is using a helluva lot more code to run a trigger once that would be run once anyways. and quests are created for ALL PLAYERS!