• 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 making help

Status
Not open for further replies.
Level 3
Joined
Apr 5, 2013
Messages
30
Im making a tavern that you can buy quests from and not just the regular guy with mark above head. So I need something that when you click the quest in the marketplace it gives you the quest and my current trigger is Unit - A unit comes within 256.00 of |cffffcc00Basic Questgiver Skypper|r 0023 <gen>
which is just not good because when I get within that range I get the quest so can someone create a trigger like that so its like buying an item from a marketplace and it gives you the quest Ive been trying for a long time with give rep!:goblin_good_job:
 
Level 3
Joined
Apr 5, 2013
Messages
30
make an ability based on channel for each of the quests u want the tavern to have. make sure you change the base order id for the channel abilities. then trigger each ability for the quest that you want it to do.

can you please make an example so I can understand :D IM kinda new at all this

maybe an example in a map for me to download and look at and how do I trigger each ability to how I want to do it?
 
Last edited by a moderator:
Level 3
Joined
Apr 5, 2013
Messages
30
Thank you that really helped +rep but it still didnt help me all the way it gave me an idea but I cant find where you got Quest 1 in(Ability being cast) Equal to Sphere
is what it gives me and IDK What to find please help me deathismyfriend
 
Last edited:
Level 4
Joined
Nov 27, 2012
Messages
85
Since this guy was using the unit comes within range event,
using Items instead of abilities would probably be more appropriate.

Would also work better for multiplayers
 
Level 10
Joined
Dec 15, 2012
Messages
650
can someone create a trigger like that so its like buying an item from a marketplace and it gives you the quest
My Suggestion :ogre_hurrhurr: :
First of all, use Tome of Agility (use a +0 agi ability) as your quests (instead of items) and check "Stats - Use Automatically When Acquired" box.
Here's the trigger :
  • Buy Quest
    • Events
      • Unit - A unit Sells an item (from shop)
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Sold Item)) Equal to Tome of Agility
        • Then - Actions
          • Set Player = (Owner of (Buying unit))
          • Quest - Create a Required quest titled Title with the description Description, using icon path ReplaceableTextures\CommandButtons\BTNAmbush.blp
          • Quest - Disable (Last created quest)
          • Custom script: if GetLocalPlayer() == udg_Player then
          • Quest - Enable (Last created quest)
          • Custom script: endif
        • Else - Actions
It just my suggestion and it hasn't be tested, someone can help check this trigger.
 
Level 3
Joined
Apr 5, 2013
Messages
30
Wow thank you for all the awesome replies for starting the quest but how would you finish it would you have to buy the tome again or can I make it so you right click the marketplace
 
Level 3
Joined
Apr 5, 2013
Messages
30
The basic spys must die
Events
Unit - |cffffcc00Basic Questgiver Skypper|r 0023 <gen> Sells an item (from shop)
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Item-type of (Sold Item)) Equal to The basic spys must die!
Then - Actions
Set Player = (Owner of (Buying unit))
Quest - Create a Required quest titled The basic spys must... with the description I need you to kill ..., using icon path ReplaceableTextures\CommandButtons\BTNAmbush.blp
Quest - Disable (Last created quest)
Custom script: if GetLocalPlayer() == Villager 017 then
Quest - Enable (Last created quest)
Custom script: endif
Else - Actions
this is what I did and it doesnt do anything when I click on the Custom Item i made for the quest what am I doing wrong
then I got 3 scripting errors because of the 2 custom scrpt D:
 
Last edited:
use trigger tags plz like this
  • Events
    • Unit - |cffffcc00Basic Questgiver Skypper|r 0023 <gen> Sells an item (from shop)
  • Conditions
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Item-type of (Sold Item)) Equal to The basic spys must die!
      • Then - Actions
        • Set Player = (Owner of (Buying unit))
        • Quest - Create a Required quest titled The basic spys must... with the description I need you to kill ..., using icon path ReplaceableTextures\CommandButtons\BTNAmbush.blp
        • Quest - Disable (Last created quest)
        • Custom script: if GetLocalPlayer() == Villager 017 then
        • Quest - Enable (Last created quest)
        • Custom script: endif
  • Else - Actions
also try debug messages to see what fires and what doesnt. that will narrow down the problem
 
Level 4
Joined
Nov 27, 2012
Messages
85
  • if GetLocalPlayer() == Villager 017 then
This is referencing a unit for a player, it should be
  • if GetLocalPlayer()==GetOwningPlayer(gg_trg_Villager_017) then
You need to replace Villager 017 with whatever the assigned variable is. It's gonna be something like gg_trg_Villager_017 (probably exactly that)

To find out, you can make a new trigger, use a GUI action that will reference this "Villager 017" then Convert the trigger to custom script
 
Level 3
Joined
Apr 5, 2013
Messages
30
what should the varable type be unit array 1? or unit or something else?
  • The basic spys must die
    • Events
      • Unit - |cffffcc00Basic Questgiver Skypper|r 0023 <gen> Sells an item (from shop)
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Sold Item)) Equal to The basic spys must die!
        • Then - Actions
          • Set Player = (Owner of (Buying unit))
          • Quest - Create a Required quest titled The basic spys must... with the description I need you to kill ..., using icon path ReplaceableTextures\CommandButtons\BTNAmbush.blp
          • Quest - Disable (Last created quest)
          • Custom script: if GetLocalPlayer() == GetOwningPlayer(gg_unit_Hero_var) then
          • Quest - Enable (Last created quest)
          • Custom script: endif
        • Else - Actions
 
Last edited:
Level 3
Joined
Apr 5, 2013
Messages
30
I mean raw code not unit classification.

Go to object editor > Ctrl + D to view raw codes

  • Custom script: if GetLocalPlayer() == GetOwningPlayer(gg_unit_Hero_var) then
do I do hero or the quest giver for the Hero_var part? and the
  • Custom script: endif
that one endif still gives me me a script error
 
Level 4
Joined
Nov 27, 2012
Messages
85
lols shit
I've never used a global placed unit so I wasn't sure

This will work
  • Custom script: if GetLocalPlayer() == udg_Player then
or, if you're not referencing that Player variable anywhere else, replace the Hero_var part with your hero following Almia's replies

the 2nd endif is fine, it's that 1st line throwing the errors


yo I think he gets it, sounds like he just wasn't sure WHICH unit was suppose to replace that part
 
Level 3
Joined
Apr 5, 2013
Messages
30
  • The basic spys must die
    • Events
      • Unit - |cffffcc00Basic Questgiver Skypper|r 0023 <gen> Sells an item (from shop)
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Sold Item)) Equal to The basic spys must die!
        • Then - Actions
          • Set Player = (Owner of (Buying unit))
          • Quest - Create a Required quest titled The basic spys must... with the description I need you to kill ..., using icon path ReplaceableTextures\CommandButtons\BTNAmbush.blp
          • Quest - Disable (Last created quest)
          • Custom script: if GetLocalPlayer() == udg_Player then
          • Quest - Enable (Last created quest)
          • Custom script: endif
        • Else - Actions
This is what I have so far and no script errors but it still doesnt give me a quest! it just buys it and doesnt do anything so what should I do please explain simpler because im not very good at this lol im kinda getting it Almia just a little more please :D and how do you create a unit variable with your hero? because Im not seeing any heros Im seeing player 1 2 3 4...
I designed a variable named hVill for unit type and did the hero I wanted but that failed D:
  • Custom script: if GetLocalPlayer() == udg_hVill then
 
Last edited:
Level 3
Joined
Apr 5, 2013
Messages
30
in between actions put in game messages. and see if they are displayed in game

like this.
  • Untitled Trigger 001
    • Events
    • Conditions
    • Actions
      • Game - Display to (All players) the text: 1
      • Set player = (Owner of (Sold Item))
      • Game - Display to (All players) the text: 2

Ok so i got him to give me the quest but now my killcounter isnt working and IDK how to turn stuff in but 1 part is done lol ty for the help so far guys +rep so far for everyone (IDK if he even game me the quest but it showed it in the quest thing if that counts)
 
Level 3
Joined
Apr 5, 2013
Messages
30
  • Kill
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Rifleman
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • RiflemenString[(Player number of (Owner of (Killing unit)))] Equal to on
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • RiflemenKilled[(Player number of (Owner of (Killing unit)))] Greater than or equal to 5
            • Then - Actions
              • Quest - Display to (All players) the Quest Update message: You have killed 5 R...
              • Set RiflemenString[(Player number of (Owner of (Killing unit)))] = pending
            • Else - Actions
              • Set RiflemenKilled[(Player number of (Owner of (Killing unit)))] = (RiflemenKilled[(Player number of (Owner of (Killing unit)))] + 1)
              • Quest - Display to (All players) the Quest Update message: (Riflemen Killed: + ((String(RiflemenKilled[(Player number of (Owner of (Killing unit)))])) + /5))
        • Else - Actions
This is my trigger for the kill counter
 
Level 3
Joined
Apr 5, 2013
Messages
30
I did it and it said what I wanted it too when I killed one but I dont think its working on the quest I just think its saying that because one of those specific units died
 
Status
Not open for further replies.
Top