Cooked meat at camp fire

najrasaam

New Member
Reaction score
0
In troll tribes u can lay down corpses (meat) at a camp fire.
Then you click on the camp fire and click on cook meat. The corpses will vanish and cooked meat items will appear.

som1 has the triggers for doing this?
 

Tyrulan

Ultra Cool Member
Reaction score
37
Easy. Select Units withing range of the campfire matching conditions of 1. Bear Meat, 2. Wolf meat etc... then remove item from game. Create new Cooked Bear Meat etc. And done.

Trigger:
  • Untitled Trigger 001
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Cook
    • Actions
      • Item - Pick every item in (Region centered at (Position of (Casting unit)) with size (200.00, 200.00)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of (Picked item)) Equal to Bear Meat
            • Then - Actions
              • Item - Remove (Picked item)
              • Item - Create Cooked Bear Meat at (Position of (Casting unit))
            • Else - Actions


That's just the basic structure, the rest is up to you.
 

Danis[h]

New Member
Reaction score
19
Easy. Select Units withing range of the campfire matching conditions of 1. Bear Meat, 2. Wolf meat etc... then remove item from game. Create new Cooked Bear Meat etc. And done.

Trigger:
  • Untitled Trigger 001
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Cook
    • Actions
      • Item - Pick every item in (Region centered at (Position of (Casting unit)) with size (200.00, 200.00)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of (Picked item)) Equal to Bear Meat
            • Then - Actions
              • Item - Remove (Picked item)
            • Else - Actions
              • Item - Create Cooked Bear Meat at (Position of (Casting unit))


That's just the basic structure, the rest is up to you.

This won't work.. It will pick every item within a square of the casting unit and if there are any items to be picked, it will remove them..

If there isn't, it will create cooked bear meat..

This means that it will only create cooked meat when there's no meat nearby. You have to move the create action in under the THEN actions.
 

Tyrulan

Ultra Cool Member
Reaction score
37
> You have to move the create action in under the THEN actions

I've already fixed it before I received your comment, realized what I had done and fixed it. This code does work... and only removes if it is bear meat etc.
 

najrasaam

New Member
Reaction score
0
> You have to move the create action in under the THEN actions

I've already fixed it before I received your comment, realized what I had done and fixed it. This code does work... and only removes if it is bear meat etc.

thank you both for the quick response! :):):):thup::thup::thup:

;)
 

Nexor

...
Reaction score
74
island troll tribes is using the corpse cargo ability, right?
if so, then they are units... dead units...
You should check for dead units around the campfire and create items on the position of the corpses and ofc remove the corpses
 

blooman

New Member
Reaction score
16
island troll tribes is using the corpse cargo ability, right?
if so, then they are units... dead units...
You should check for dead units around the campfire and create items on the position of the corpses and ofc remove the corpses
yup exactly what i meant the corpse isnt an itemXD
 

Danis[h]

New Member
Reaction score
19
island troll tribes is using the corpse cargo ability, right?
if so, then they are units... dead units...
You should check for dead units around the campfire and create items on the position of the corpses and ofc remove the corpses

Although it could be an item :)
 

Nexor

...
Reaction score
74
Trigger:
  • Cook yummy meat
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to <Cook Meat>
    • Actions
      • Set TempLoc = (Position of (Triggering unit))
      • Set TempGroup = (Units within 400.00 of TempLoc matching (((Matching unit) is dead) Equal to True))
      • Custom script: call RemoveLocation(udg_TempLoc)
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • Set TempLoc = (Position of (Picked unit))
          • Unit - Remove (Picked unit) from the game
          • Item - Create <Meat> at TempLoc
          • Custom script: call RemoveLocation(udg_TempLoc)
      • Custom script: call DestroyGroup(udg_TempGroup)


Here's your leakless trigger

you can also check for things like matching unit isn't a hero and so on, it's your choice :)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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