• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Quest Trigger Problem

Status
Not open for further replies.
Level 11
Joined
Mar 30, 2008
Messages
666
Hi.I have problems with these triggers,oh,maybe is only 1 but...
  • Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Custom script: call InitQuestSystem()
      • Set QuestGivers[1] = Zuki 0018 <gen>
      • Set QuestGivers[2] = Villager 0034 <gen>
      • Set TheHero = (Summoning unit)
      • -------- The system uses units to store its data, TheHero Variable will be used in this case. --------
      • Game - Show creep camps on the minimap
      • Game - Disable ally color button and Disable creep camp button
      • Trigger - Run Init Quest A <gen> (ignoring conditions)
      • Trigger - Run Init Quest B <gen> (ignoring conditions)
  • Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Custom script: call InitQuestSystem()
      • Set QuestGivers[1] = Zuki 0018 <gen>
      • Set QuestGivers[2] = Villager 0034 <gen>
      • Set TheHero = (Summoning unit)
      • -------- The system uses units to store its data, TheHero Variable will be used in this case. --------
      • Game - Show creep camps on the minimap
      • Game - Disable ally color button and Disable creep camp button
      • Trigger - Run Init Quest A <gen> (ignoring conditions)
      • Trigger - Run Init Quest B <gen> (ignoring conditions)
JASS:
function Trig_Init_Quest_A_Actions takes nothing returns nothing

    local string QuestId = "1"
    
    call StoreString(udg_questsys,QuestId, "name", "Kill the Orc Warcheif" )
    // Quest Name

    call StoreString(udg_questsys,QuestId, "description", "He should be north of here." )
    // Quest Description

    call StoreString(udg_questsys,QuestId, "icon", "ReplaceableTextures\\CommandButtons\\BTNChaosWarlord.blp" )
    // Quest Icon

    call StoreString(udg_questsys,QuestId, "req1", "Kill the Orc Warcheif" )
    // Quest Requirment #1

    call StoreString(udg_questsys,QuestId, "req2", "Return to Zuki" )
    // Quest Requirment #2

    call StoreInteger(udg_questsys,QuestId, "reqcount", 2 )
    // We have 2 Requirments

    call StoreInteger(udg_questsys,QuestId, "questgiver", H2I(udg_QuestGivers[1]) )
    // Quest giver Landazar

    call CreateQuestEffect( Player(0), 1 )
    // Create the yellow ! mark


endfunction

//===========================================================================
function InitTrig_Init_Quest_A takes nothing returns nothing
    set gg_trg_Init_Quest_A = CreateTrigger()
    call TriggerAddAction( gg_trg_Init_Quest_A, function Trig_Init_Quest_A_Actions )
endfunction
  • Start Quest A
    • Events
      • Unit - A unit enters Region 004 <gen>
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • -------- Check if the player has the quest... --------
      • Custom script: if GetQuestState(GetTriggerUnit(),1)==0 then
      • -------- Start Quest #1 --------
      • Custom script: call StartQuest( GetTriggerUnit(), 1 )
      • Custom script: endif
  • Advance Quest A
    • Events
      • Unit - Gnoll Warden 0058 <gen> Dies
    • Conditions
    • Actions
      • -------- The Objective is complete, finish the Quest Requirment --------
      • -------- Quest State 1 = Player just started the quest, he did not finish any of the objectives yet. --------
      • Custom script: if GetQuestState(udg_TheHero,1)==1 then
      • -------- Finish the objective --------
      • Custom script: call CompleteReq(udg_TheHero, 1, 1)
      • -------- Finish quest requirment for Triggering unit, quest id = 1 and quest requirment index = 1 --------
      • Custom script: call CreateQuestEffect( GetOwningPlayer(udg_TheHero), 1 )
      • -------- The next quest requirment is to return to Baazun, lets create a TalkToMe effect so that the player finds him more easily --------
      • Custom script: endif
  • Finish Quest A
    • Events
      • Unit - A unit enters Region 004 <gen>
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • -------- Quest State 2 = Player finished first quest objective. --------
      • Custom script: if GetQuestState(GetTriggerUnit(),1)==2 then
      • -------- Finish Quest #1 --------
      • Custom script: call FinishQuest( GetTriggerUnit(), 1 )
      • Custom script: endif
I have problems with
  • Set TheHero = (Summoning unit)
.My Hero is created at a center of a region.
So I need help with SetHer = ....... !?!?!?
 
Status
Not open for further replies.
Top