A little triggering help

Killerbf21

New Member
Reaction score
1
So I want to set up a trigger that does the fallowing.

- If hero has item of item type Sword and Armor, turn off another trigger
- If hero has item of type Sword, turn off Give Sword trigger
- If hero has item of type Armor, turn off Give Armor trigger
-If hero has items of type Sword and Armor, mark Objective as Complete

EDIT: Also, I can't figure out how to mark the Objective as Completed. This is what I have set up to mark a Mission as finished when you do all the required things.

Code:
    Events
        Unit - Zealot [92.52, 40.92] Enters Wrecked Ship
    Local Variables
        Intro Quest = (Last created objective) <Objective>
    Conditions
    Actions
        Variable - Set Intro Quest = (Last created objective)
        Objective - Mark (Last created objective) as Completed
        UI - Display (Name of Zealot) for (All players) to Subtitle area
        UI - Display "Hmmm" for (All players) to Subtitle area
        General - Wait 10.0 Game Time seconds
        UI - Clear All Messages for (All players)
        UI - Display (Name of Zealot) for (All players) to Subtitle area
        UI - Display "Damnit... Only a Healthkit... I nee..." for (All players) to Subtitle area
        General - Wait 2.0 Game Time seconds
        Objective - Create a Active Primary objective with text "Finding a Sword and Armor" and description "Debree from the ship is scattered a..."
        Objective - Set (Last created objective) players to (Active Players)
        Objective - Show (Last created objective) for (Active Players)
        General - Wait 8.0 Game Time seconds
        UI - Clear All Messages for (All players)

This is what I have so far.

Code:
    Events
        Unit - Zealot [92.52, 40.92] Receives ("Armor" from the Global data table)
        Unit - Zealot [92.52, 40.92] Receives ("Sword" from the Global data table)
    Local Variables
    Conditions
    Actions
        General - If (Conditions) then do (Actions) else do (Actions)
            If
                (Item carried by Zealot [92.52, 40.92] in 1) == ("Sword" from the Global data table)
                And
                    Conditions
                        (Item carried by Zealot [92.52, 40.92] in 1) == ("Armor" from the Global data table)
            Then
                Trigger - Turn Cannot leave untill Armor/Sword is found Off
                Objective - Mark (Last created objective) as Completed
            Else
Code:
    Events
        Unit - Zealot [92.52, 40.92] Enters Leave Begining Area
    Local Variables
    Conditions
    Actions
        General - If (Conditions) then do (Actions) else do (Actions)
            If
                ((Last created objective) state) == Completed
            Then
                UI - Display (Name of Zealot) for (All players) to Subtitle area
                UI - Display "So... No idea where I am... No clue..." for (All players) to Subtitle area
                General - Wait 10.0 Game Time seconds
                UI - Clear All Messages for (All players)
            Else
                UI - Display (Name of Zealot) for (All players) to Subtitle area
                Unit - Move (Triggering unit) instantly to Hero Respawn Point (No Blend)
                UI - Display "I think i'll wait untill I have a w..." for (All players) to Subtitle area

Any help that is givin is greatly appreciated!!!
 

themean

Active Member
Reaction score
7
im not sure what you need
maybe you must use event of type
"Unit manipulates inventory (GUI version)" whit manipulates=gains
unit=some function item =some function
try it
 

Killerbf21

New Member
Reaction score
1
No... What I need is to make the GUI triggers say something along these lines:

Set Variable: Item in item slot 1 = Sword
Set Variable: Item in item slot 2 = Armor

It has to do that when you pick up said item. Then:

Once item in item slot 1 is a Sword, and item in item slot 2 is Armor, turn off a specific trigger, turn on a different trigger.

The Trigger code in GUI for Warcraft3 editor is:
Code:
Untitled Trigger 001
    Events
        Unit - Peasant 0000 <gen> Acquires an item
    Conditions
        (Item-type of (Item being manipulated)) Equal to Tome of Experience
    Actions
        Set HasRequiredItems[1] = 1
Code:
Untitled Trigger 001 Copy
    Events
        Unit - Peasant 0000 <gen> Acquires an item
    Conditions
        (Item-type of (Item being manipulated)) Equal to Tome of Power
    Actions
        Set HasRequiredItems[1] = (HasRequiredItems[1] + 1)
Code:
Untitled Trigger 002
    Events
        Time - Every 0.10 seconds of game time
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                HasRequiredItems[1] Equal to 2
            Then - Actions
                Trigger - Turn off Untitled Trigger 002 Copy <gen>
                Trigger - Turn on Untitled Trigger 002 <gen>
            Else - Actions
Of corse if I knew how to do this via GUI on the Starcraft 2 editor, I wouldn't need to post on here.
 

themean

Active Member
Reaction score
7
i dont know why exactly you want but this event started when you pick item,drop item ,use item ,sell item ,buy item etc.
maybe whit condition you can control slot 1 slot 2 ...
 

Killerbf21

New Member
Reaction score
1
I want something that notices that you have a specific items in an item slot in you bag, then does something. You have a sword? Turn off GIVE sword trigger, Mark Gain A Sword objective as complete, turn on Spawn creep trigger. You dont have a sword? Turn on Give sword trigger, Create new objective titled "Gain a sword", Lock area so you cant leave til you get one....... Don't know how else to explain what i am tryin to make my trigger do...
 

Severon

New Member
Reaction score
7
I'm not sure if this is going to help, but I'm not at home to look into this.

Give the sword a behavior that the units gets upon equiping.

Then if unit has behavior == sword behavior
turn off give sword

like i said not able to look a editor so that might not be right, but I do remember people mentioning the ability to detect different behaviors.
 

Killerbf21

New Member
Reaction score
1
I'm not sure if this is going to help, but I'm not at home to look into this.

Give the sword a behavior that the units gets upon equiping.

Then if unit has behavior == sword behavior
turn off give sword

like i said not able to look a editor so that might not be right, but I do remember people mentioning the ability to detect different behaviors.

That would be great. Because I can't find a trigger that grabs the item unless I place the item in game, which I don't want to do. I'll give that a try and let you know if it works.


Edit: Works like a charm. Thanks man
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      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