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.
  • Varine Varine:
    I ordered like five blocks for 15 dollars. They're just little aluminum blocks with holes drilled into them
  • Varine Varine:
    They are pretty much disposable. I have shitty nozzles though, and I don't think these were designed for how hot I've run them
  • Varine Varine:
    I tried to extract it but the thing is pretty stuck. Idk what else I can use this for
  • Varine Varine:
    I'll throw it into my scrap stuff box, I'm sure can be used for something
  • Varine Varine:
    I have spare parts for like, everything BUT that block lol. Oh well, I'll print this shit next week I guess. Hopefully it fits
  • Varine Varine:
    I see that, despite your insistence to the contrary, we are becoming a recipe website
  • Varine Varine:
    Which is unique I guess.
  • The Helper The Helper:
    Actually I was just playing with having some kind of mention of the food forum and recipes on the main page to test and see if it would engage some of those people to post something. It is just weird to get so much traffic and no engagement
  • The Helper The Helper:
    So what it really is me trying to implement some kind of better site navigation not change the whole theme of the site
  • Varine Varine:
    How can you tell the difference between real traffic and indexing or AI generation bots?
  • The Helper The Helper:
    The bots will show up as users online in the forum software but they do not show up in my stats tracking. I am sure there are bots in the stats but the way alot of the bots treat the site do not show up on the stats
  • Varine Varine:
    I want to build a filtration system for my 3d printer, and that shit is so much more complicated than I thought it would be
  • Varine Varine:
    Apparently ABS emits styrene particulates which can be like .2 micrometers, which idk if the VOC detectors I have can even catch that
  • Varine Varine:
    Anyway I need to get some of those sensors and two air pressure sensors installed before an after the filters, which I need to figure out how to calculate the necessary pressure for and I have yet to find anything that tells me how to actually do that, just the cfm ratings
  • Varine Varine:
    And then I have to set up an arduino board to read those sensors, which I also don't know very much about but I have a whole bunch of crash course things for that
  • Varine Varine:
    These sensors are also a lot more than I thought they would be. Like 5 to 10 each, idk why but I assumed they would be like 2 dollars
  • Varine Varine:
    Another issue I'm learning is that a lot of the air quality sensors don't work at very high ambient temperatures. I'm planning on heating this enclosure to like 60C or so, and that's the upper limit of their functionality
  • Varine Varine:
    Although I don't know if I need to actually actively heat it or just let the plate and hotend bring the ambient temp to whatever it will, but even then I need to figure out an exfiltration for hot air. I think I kind of know what to do but it's still fucking confusing
  • The Helper The Helper:
    Maybe you could find some of that information from AC tech - like how they detect freon and such
  • Varine Varine:
    That's mostly what I've been looking at
  • Varine Varine:
    I don't think I'm dealing with quite the same pressures though, at the very least its a significantly smaller system. For the time being I'm just going to put together a quick scrubby box though and hope it works good enough to not make my house toxic
  • Varine Varine:
    I mean I don't use this enough to pose any significant danger I don't think, but I would still rather not be throwing styrene all over the air

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top