Trigger not firing Properly

Slayerxx

You can change this now in User CP.
Reaction score
3
Ok so i am making a (Sexiest) ability for my support woman (Tower builder) it is to make a sandwich and depending on the different sandwich it gives the eater different effects. I have the "Sandwich's" as buildings and what i want to happen is that the Woman buys the ingredients (Items) and then goes to build a "sandwich". now i have a trigger to once run removes corresponding ingredients and give the desired sandwich. this is what i have so far and the problem is that i dont know what to have as teh Unit conditions ie Triggering unit, Ordered unit etc.

Trigger:
  • Woman Goes to make a Sandwich
    • Events
      • Unit - A unit Begins construction
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Suport Woman
    • Actions
      • Game - Display to (All players) the text: (Name of Woman)
      • Set Woman = (Triggering unit)
      • Set Bread = (Item carried by (Triggering unit) of type Bread)
      • Set Cheese = (Item carried by (Triggering unit) of type Cheese)
      • Set Ham = (Item carried by (Triggering unit) of type Ham)
      • Set Lettuce = (Item carried by (Triggering unit) of type Lettuce)
      • Set Tomato = (Item carried by (Triggering unit) of type Tomato)
      • Unit - Kill (Constructing structure)
      • If ((Unit-type of (Constructing structure)) Equal to Tasty Sandwich) then do (Trigger - Run Tasty Sandwich <gen> (checking conditions)) else do (Do nothing)
      • If ((Unit-type of (Constructing structure)) Equal to Frozen Sandwich) then do (Trigger - Run Frozen Sandwich <gen> (checking conditions)) else do (Do nothing)
      • If ((Unit-type of (Constructing structure)) Equal to Flaming Sandwich) then do (Trigger - Run Flaming Sandwich <gen> (checking conditions)) else do (Do nothing)
      • If ((Unit-type of (Constructing structure)) Equal to Shadow Sandwich) then do (Trigger - Run Shadow Sandwich <gen> (checking conditions)) else do (Do nothing)



there is alot to do with this still, i just cant think of how to do it. also once working i am hoping to remove "Changes" on items as ingredients have charges so each sandwich uses 2 slices of bread so 2 charges are removed from "Bread"
 

Extes

Cool Member
Reaction score
5
I keep reading your post, and I get the feeling I 'may' be able to help, but I am not exactly sure what the problem is... the trigger looks like its fetching data from other variables not seen here, as well as other triggers. Are you trying to remove the items from the woman's inventory? Or trying to make her go away? You want the person eating the sandwiches (hamburglar) to get a buff after destroying the building/eating the sandwich?
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
Constructing a structure will never return you the building unit. All structure events (begins, finishes, cancels) will always return the structure as the triggering unit.

I would advice you not to use a construction but rather an ability. Maybe the ivory tower ability if you really want them to be structures.
When using an ability you can easily refer to the casting unit.
 

Slayerxx

You can change this now in User CP.
Reaction score
3
Sorry for not being specific enough. Basicly Like alchemy i want to make somthing from multi able things in this case Making a Tasty Sandwich from Bread, cheese, ham, tomato and lettuce. The sandwich is an item and so are the ingredients. so The woman Buys the ingredients (Items) and makes the sandwich. I hope to do this by in the woman's build Selections there are the different Sandwich's that can be made granted you have the right ingredients. So i have dummy buildings for each sandwich, and what i want the triggers to do is when the woman goes to make a sandwich they select it from the build screen and then just place it anywhere, This is what i want as the trigger event. So When you go to build a Tasty Sandwich you start to build it and then the trigger scans your inventory and if you have the correct ingredients then the respected amount of ingredients is removed and the sandwich is placed in the woman's inventory.
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
As i said before, i would definitely not advice you to use structures for this purpose, since all the events which base upon constructing a structure will never grant you a event response which gives you the building unit.
I would rather use abilities for it.
If you want a sub menu i would use a spellbook filled with channel based abilities.

Structures are a bad choice for many purposes.
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
i lold when i saw that your ability was "sexy" by having the woman making a sandwich
 
General chit-chat
Help Users

      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