Triggers - Quests

Husky

Local Lurker
Reaction score
120
I think it's an Integer (not sure though). Try that instead of a Quest Variable.
 
B

Buck_Teeth7

Guest
Help

Trigger two didn't work. It displayed 1/10 for the first kobold killed, but the other nine, nothing happened. After killing the 10 kobolds, the message didn't come up. I decided not to waste time on Trigger Three. Trigger two looks fine by the example, but it isn't. I would like to point out that I changed it in three minor ways. I hope that this isn't the cause of the problem.

1. Instead of Kobold Geomancers and Task Masters, I'm using Kobolds and Kobold Geomancers.
2. Instead of using a Captain, I'm using a custom unit, a Chief Sorceress.
3. Instead of using a Paladin, I'm using my custom hero, the tester (A Maiden of Pain).

I'm uploading the file, can someone please see what is going wrong and tell me?

Chief Sorceress is found in New Dalaran City, near the Arcane Sanctum.

If you die, you should be able to revive yourself at the farm near your starting point. It hopefully won't cost any money to revive.
 

Attachments

  • New Dalaran2 (Home City).w3x
    47.1 KB · Views: 421
M

mafia505

Guest
ty

i made a small rpg... (just for fun) just to check if this tutorial worked... and it did ofcourse ^^ it worked prefectly fine. im going to make a better one later so anyways thanks alot dude ur great +rep:)
 

Attachments

  • BETA2.w3x
    26.4 KB · Views: 464

martin1

New Member
Reaction score
0
Hi, I don't understand this condition: "((Region centered at (Position of Captain 0009 <gen>) with size (400.00, 400.00)) contains Paladin 0018 <gen>) Equal to True"
:confused::confused::confused:
Where can I find it in the condition list?

[Edit]
Look under Booleans, Region contains unit.

And then?
 

skytainted

New Member
Reaction score
3
((Region centered at (Position of Captain 0009 <gen>) with size (400.00, 400.00)) contains Paladin 0018 <gen>) Equal to True

Where do you see this? I can't find it in the conditions part. Is it in Boolean?
 
K

Karl-J

Guest
Need Help

I read your tutorial and tried to make a similar quest where "hero" frees units instead of killing them. The thing is that I can only free one unit, and after that, nothing happens.

Please, look if I've made a misstake or somthing, thanks :)

Events
Unit - A unit comes within 150.00 of Frank 0102 <gen>

Conditions
(Unit-type of (Triggering unit)) Equal to Slave

Actions
Unit - Order (Triggering unit) to Move To (Center of FrankQuestStart <gen>)
Set SlaveFreed = (SlaveFreed + 1)
Game - Display to (All players) for 3.00 seconds the text: (((String(SlaveFreed)) + /10) + Slaves Freed)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SlaveFreed Equal to 10
Then - Actions
Game - Display to (All players) the text: Return with Frank t...
Unit - Order Frank to Move To (Center of FrankQuestStart <gen>)
Else - Actions
Trigger - Turn off (This trigger)
 

Mallen

New Member
Reaction score
2
everthing worked fine for me in the first trigger its just secound that doesnt work. and i know why. how do i make a event named: "A Unit Dies"? i have to select a unit or choose: "No Unit Dies"...i dont get xD
 

BlightWarden

New Member
Reaction score
6
everthing worked fine for me in the first trigger its just secound that doesnt work. and i know why. how do i make a event named: "A Unit Dies"? i have to select a unit or choose: "No Unit Dies"...i dont get xD

I think I can help, but I'm not sure this is what you're looking for.

Unit> Generic Unit Event > A Unit Dies. (this allows you to make the trigger without having the unit on the map.)

You will need a condition to make this work.

Unit-Type Comparison > Unit type of (Dying unit)) Equal to Kobold. (Or equal to whatever unit you want.)

You can also add in a regional condition if you plan on having more than one of a unit. So if your map has 10 kobolds all over the map, you can specify a region if you need to.

Not sure if I helped, hope I did.:thup:
 

FizzeyDizzey

New Member
Reaction score
0
Im doing something like this

:banghead::banghead::banghead:Im doing something like this just a little different... I want the quest to only activate for one person... im making an ORPG and i already got the save and load triggers working so it would really suck to stop it at this point
:banghead::banghead::banghead:

Here are my variables:

HeroPlayerGroup - Player Group - Array (Size 100) - Initial Value: Empty Player Group (Default)
Quest_SheepKilled_1 - Integer - Array (Size 100) - Initial Value: 0 (Default)

The HeroPlayerGroup is already intialized here

Trigger:
  • Events
    • Time - Elapsed game time is 0.10 seconds
    • Actions
      • Player Group - Add Player 1 (Red) to HeroPlayerGroup[(Player number of (Triggering player))]
      • Player Group - Add Player 2 (Blue) to HeroPlayerGroup[(Player number of (Triggering player))]
      • Player Group - Add Player 3 (Teal) to HeroPlayerGroup[(Player number of (Triggering player))]
      • Player Group - Add Player 4 (Purple) to HeroPlayerGroup[(Player number of (Triggering player))]
      • Player Group - Add Player 5 (Yellow) to HeroPlayerGroup[(Player number of (Triggering player))]
      • Player Group - Add Player 6 (Orange) to HeroPlayerGroup[(Player number of (Triggering player))]
      • Player Group - Add Player 7 (Green) to HeroPlayerGroup[(Player number of (Triggering player))]
      • Player Group - Add Player 8 (Pink) to HeroPlayerGroup[(Player number of (Triggering player))]
      • Player Group - Add Player 9 (Gray) to HeroPlayerGroup[(Player number of (Triggering player))]
      • Player Group - Add Player 10 (Light Blue) to HeroPlayerGroup[(Player number of (Triggering player))]


here is my first trigger

TRIGGER 1

Kill Sheep

Trigger:
  • Events
    • Unit - A unit owned by Player 1 (Red) Acquires an item
    • Unit - A unit owned by Player 2 (Blue) Acquires an item
    • Unit - A unit owned by Player 3 (Teal) Acquires an item
    • Unit - A unit owned by Player 4 (Purple) Acquires an item
    • Unit - A unit owned by Player 5 (Yellow) Acquires an item
    • Unit - A unit owned by Player 6 (Orange) Acquires an item
    • Unit - A unit owned by Player 7 (Green) Acquires an item
    • Unit - A unit owned by Player 8 (Pink) Acquires an item
    • Unit - A unit owned by Player 9 (Gray) Acquires an item
    • Unit - A unit owned by Player 10 (Light Blue) Acquires an item
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Item-type of (Item carried by (Triggering unit) in slot 1)) Equal to Quest - Beginner
          • (Item-type of (Item carried by (Triggering unit) in slot 2)) Equal to Quest - Beginner
          • (Item-type of (Item carried by (Triggering unit) in slot 3)) Equal to Quest - Beginner
          • (Item-type of (Item carried by (Triggering unit) in slot 4)) Equal to Quest - Beginner
          • (Item-type of (Item carried by (Triggering unit) in slot 5)) Equal to Quest - Beginner
          • (Item-type of (Item carried by (Triggering unit) in slot 6)) Equal to Quest - Beginner
    • Actions
      • Quest - Create a Optional quest titled Kill The Sheep with the description You must kill 5 she..., using icon path ReplaceableTextures\CommandButtons\BTNRune.blp
      • Quest - Display to HeroPlayerGroup[(Player number of (Triggering player))] the Quest Update message: So you want to run ...
      • Trigger - Turn on Kill Sheep 2 &lt;gen&gt;



TRIGGER 2

Kill Sheep 2

Trigger:
  • Events
    • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Sheep
      • Or - Any (Conditions) are true
        • Conditions
          • (Owner of (Killing unit)) Equal to Player 1 (Red)
          • (Owner of (Killing unit)) Equal to Player 2 (Blue)
          • (Owner of (Killing unit)) Equal to Player 3 (Teal)
          • (Owner of (Killing unit)) Equal to Player 4 (Purple)
          • (Owner of (Killing unit)) Equal to Player 5 (Yellow)
          • (Owner of (Killing unit)) Equal to Player 6 (Orange)
          • (Owner of (Killing unit)) Equal to Player 7 (Green)
          • (Owner of (Killing unit)) Equal to Player 8 (Pink)
          • (Owner of (Killing unit)) Equal to Player 9 (Gray)
          • (Owner of (Killing unit)) Equal to Player 10 (Light Blue)
    • Actions
      • Set Quest_SheepKilled_1[(Player number of (Triggering player))] = (Quest_SheepKilled_1[(Player number of (Triggering player))] + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Quest_SheepKilled_1[(Player number of (Triggering player))] Greater than or equal to 5
        • Then - Actions
          • Game - Display to HeroPlayerGroup[(Player number of (Triggering player))] for 3.00 seconds the text: Quest Completed! Re...
        • Else - Actions
          • Game - Display to HeroPlayerGroup[(Player number of (Triggering player))] for 3.00 seconds the text: ((String(Quest_SheepKilled_1[(Player number of (Triggering player))])) + have been killed. You need to kill 5 Total.)


can anyone please help me? i've been at this for 2 hours trying tons of possible solutions but to no avail... THANKS FOR READING/HELPING ME
 

Dirac

22710180
Reaction score
147
You're confusing what "Triggering player" is for.
If the event wasn't fired by a player then don't use it, it would be equal to NO PLAYER because NO PLAYER is firing the trigger.

Init trigger
Trigger:
  • Event - Elapsed game time is 0.10
(no player is firing this event, Triggering player is equal to NO PLAYER)

Trigger 1
Trigger:
  • Event - A acquires an Item
(a unit is firing the event, not a player, Triggering player is equal to NO PLAYER)

Trigger 2
Trigger:
  • Event - A unit dies
(a unit is firing the event, not a player, Triggering player is equal to NO PLAYER)

Solution

Init trigger
use the player's number in the index
Trigger:
  • Player Group - Add Player 1 (Red) to HeroPlayerGroup[1]


Trigger 1
use owner of unit
Trigger:
  • Quest - Display to HeroPlayerGroup[(Player number of (Owner of unit(Triggerint Unit)))] the Quest Update message: So you want to run ...


Trigger 2
same as above, use owner of unit

Also, instead of [noparse] writing your code in
Code:
tags, use the
Trigger:
tags to make it look better[/noparse]
 

FizzeyDizzey

New Member
Reaction score
0
You're confusing what "Triggering player" is for.
If the event wasn't fired by a player then don't use it, it would be equal to NO PLAYER because NO PLAYER is firing the trigger.

Init trigger
Trigger:
  • Event - Elapsed game time is 0.10
(no player is firing this event, Triggering player is equal to NO PLAYER)

Trigger 1
Trigger:
  • Event - A acquires an Item
(a unit is firing the event, not a player, Triggering player is equal to NO PLAYER)

Trigger 2
Trigger:
  • Event - A unit dies
(a unit is firing the event, not a player, Triggering player is equal to NO PLAYER)

Solution

Init trigger
use the player's number in the index
Trigger:
  • Player Group - Add Player 1 (Red) to HeroPlayerGroup[1]


Trigger 1
use owner of unit
Trigger:
  • Quest - Display to HeroPlayerGroup[(Player number of (Owner of unit(Triggerint Unit)))] the Quest Update message: So you want to run ...


Trigger 2
same as above, use owner of unit

Also, instead of [noparse] writing your code in
Code:
tags, use the
Trigger:
tags to make it look better[/noparse]

hmm well here is my new code

tigger 1

Code:
[wc3]Events
    Unit - A unit owned by Player 1 (Red) Acquires an item
    Unit - A unit owned by Player 2 (Blue) Acquires an item
    Unit - A unit owned by Player 3 (Teal) Acquires an item
    Unit - A unit owned by Player 4 (Purple) Acquires an item
    Unit - A unit owned by Player 5 (Yellow) Acquires an item
    Unit - A unit owned by Player 6 (Orange) Acquires an item
    Unit - A unit owned by Player 7 (Green) Acquires an item
    Unit - A unit owned by Player 8 (Pink) Acquires an item
    Unit - A unit owned by Player 9 (Gray) Acquires an item
    Unit - A unit owned by Player 10 (Light Blue) Acquires an item

Conditions
    Or - Any (Conditions) are true
        Conditions
            (Item-type of (Item carried by (Triggering unit) in slot 1)) Equal to Quest - Beginner
            (Item-type of (Item carried by (Triggering unit) in slot 2)) Equal to Quest - Beginner
            (Item-type of (Item carried by (Triggering unit) in slot 3)) Equal to Quest - Beginner
            (Item-type of (Item carried by (Triggering unit) in slot 4)) Equal to Quest - Beginner
            (Item-type of (Item carried by (Triggering unit) in slot 5)) Equal to Quest - Beginner
            (Item-type of (Item carried by (Triggering unit) in slot 6)) Equal to Quest - Beginner

Actions
    Quest - Create a Optional quest titled Kill The Sheep with the description You must kill 5 she..., using icon path ReplaceableTextures\CommandButtons\BTNRune.blp
    Quest - Display to HeroPlayergroup_Quests[(Player number of (Owner of (Triggering unit)))] the Quest Update message: So you want to run ...
    Trigger - Turn on Kill Sheep 2 <gen>
[/wc3]

trigger 2

Code:
[wc3]Events
    Unit - A unit Dies

Conditions
    (Unit-type of (Triggering unit)) Equal to Sheep
    Or - Any (Conditions) are true
        Conditions
            (Owner of (Killing unit)) Equal to Player 1 (Red)
            (Owner of (Killing unit)) Equal to Player 2 (Blue)
            (Owner of (Killing unit)) Equal to Player 3 (Teal)
            (Owner of (Killing unit)) Equal to Player 4 (Purple)
            (Owner of (Killing unit)) Equal to Player 5 (Yellow)
            (Owner of (Killing unit)) Equal to Player 6 (Orange)
            (Owner of (Killing unit)) Equal to Player 7 (Green)
            (Owner of (Killing unit)) Equal to Player 8 (Pink)
            (Owner of (Killing unit)) Equal to Player 9 (Gray)
            (Owner of (Killing unit)) Equal to Player 10 (Light Blue)

Actions
    Set Quest_SheepKilled_1[(Player number of (Owner of (Triggering unit)))] = (Quest_SheepKilled_1[(Player number of (Owner of (Triggering unit)))] + 1)
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        If - Conditions
            Quest_SheepKilled_1[(Player number of (Owner of (Triggering unit)))] Greater than or equal to 5
        Then - Actions
            Game - Display to HeroPlayergroup_Quests[(Player number of (Owner of (Triggering unit)))] for 3.00 seconds the text: Quest Completed! Re...
        Else - Actions
            Game - Display to HeroPlayergroup_Quests[(Player number of (Owner of (Triggering unit)))] for 3.00 seconds the text: ((String(Quest_SheepKilled_1[(Player number of (Triggering player))])) + have been killed. You need to kill 5 Total.)
[/wc3]

but when i kill a sheep after getting the quest it doesnt say anything like it is supposed to... However when i get the quest it pops up in my quest bar...
 

Attachments

  • my orpg.w3x
    115.5 KB · Views: 408

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
in the trigger, create a new thread for it in the wc3 editor if it is correct, thats the propper area for this question, not on the actual tutorial :/
 
General chit-chat
Help Users

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top