• 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] Help me to make this quest trigger repeatable

Status
Not open for further replies.
Level 3
Joined
Apr 8, 2016
Messages
58
i made a quest for my rpg map, help me to make this quest trigger repeatable, like quest in twilight rpg map.
Thankyou & sorry for my bad english

here my triggers

TRIGGER 1
  • GettingQuest
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to quest
    • Actions
      • Trigger - Turn off (This trigger)
      • Trigger - Turn on KillCounter <gen>

TRIGGER2
  • KillCounter
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Killing unit) is A Hero) Equal to True
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Dying unit)) Equal to Gnoll
          • (Unit-type of (Dying unit)) Equal to Gnoll Poacher
    • Actions
      • Set PGroup = (Player group((Owner of (Killing unit))))
      • Set Kills[(Player number of (Owner of (Killing unit)))] = (Kills[(Player number of (Owner of (Killing unit)))] + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Kills[(Player number of (Owner of (Killing unit)))] Equal to 1
        • Then - Actions
          • Game - Display to (All players) the text: 1/3 gnoll telah dib...
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Kills[(Player number of (Owner of (Killing unit)))] Equal to 2
        • Then - Actions
          • Game - Display to (All players) the text: 2/3 gnoll telah dib...
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Kills[(Player number of (Owner of (Killing unit)))] Equal to 3
        • Then - Actions
          • Set Kills[(Player number of (Owner of (Killing unit)))] = 0
          • Game - Display to (All players) the text: 3/3 gnoll telah dib...
          • Trigger - Turn off (This trigger)
          • Trigger - Turn on Reward <gen>
        • Else - Actions
          • Do nothing
      • Custom script: call DestroyForce(udg_PGroup)

TRIGGER 3
  • Reward
    • Events
      • Unit - A unit Uses an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to quest
    • Actions
      • Item - Remove (Item carried by (Hero manipulating item) of type quest)
      • Hero - Add 2000 experience to (Hero manipulating item), Hide level-up graphics
      • Sound - Play QuestCompleted <gen>
 
I don't know twilight, sorry but i'm capable of doing this.

To make this repeatable you could use an integer array named something like "Player_Quest_State", this will replace you "dis/enabeling"-actions.

This Player_Quest_State is set to numbers representing the current state for a specific player
for example:
  • 0 = Quest not gained / Finished and Repeatable
  • 1 = Does Quest
  • 2 = Get Reward on item use
Follwing Triggers are only an overview:

Gain Quest
  • Gain Quest
    • Ereignisse
      • Unit - A unit Erwirbt einen Gegenstand
    • Bedingungen
      • Player_Quest_State[(Player number of (Triggering player))] Gleich 0
      • item = quest
    • Aktionen
      • Set Player_Quest_State[(Player number of (Triggering player))] = 1
  • Kill
    • Ereignisse
      • Unit - Killed
    • Bedingungen
      • Player_Quest_State[(Player number of (Triggering player))] Gleich 1
        • killed = gnoll
    • Aktionen
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Bedingungen
          • Kills [Killer] = 3
        • 'THEN'-Aktionen
          • Set Player_Quest_State[(Player number of (owner of Killer))] = 2
        • 'ELSE'-Aktionen
  • Reward
    • Ereignisse
      • Unit - uses item
    • Bedingungen
      • Player_Quest_State[(Player number of (Triggering player))] Gleich 2
      • item = quest
    • Aktionen
      • Set Player_Quest_State[(Player number of (owner of (triggering unit)))] = 0
 
Last edited:
Status
Not open for further replies.
Top