ITT food system?

Status
Not open for further replies.
Level 3
Joined
May 18, 2007
Messages
20
Okay, I'm making a survival map and I like the way Island troll tribes food system works, I tried making it close as possible to it, But its not working remotely at all, I was just wondering if someone could whip up a example map for me to learn it? Please and Thank you.


Hmm, Thanks raft, But I was talking about when you kill a creep it drops like hides and bodies, I was wondering how they made the system so that you pick them up and bring them to a fire and use the spell cook and they turn into cooked meat. (Edited this to my main post)
 
Last edited:
Level 9
Joined
May 27, 2006
Messages
498
  • Reduce health&mana
    • Events:
      • Time - Every 1 second of game time
    • Conditions:
    • Actions:
      • For each (Integer A) from 1 to 12 do:
        • Custom script: set bj_wantDestroyGroup = true
        • Unit Group - Pick every unit in (Units owned by player (Player(Integer A))) and do (Actions)
          • Loop - Actions
            • If/Then/Else - Multiple functions
              • If - Conditions:
                • (Picked unit) is building Equal to False
                • (Picked unit) is hero Equal to True
              • Then - Actions:
                • Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - 1 )
                • Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) - 1 )
  • Eat food
    • Events:
      • Unit - Unit uses an item
    • Conditions:
      • ((Triggering unit) is hero) Equal to True
      • (Item-type of (Item being manipulated)) Equal to Your_Item
      • And so on for rest of your food items
    • Actions:
      • Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + 100 )
  • Sleep
    • Events:
      • Unit - Unit starts effect of an ability
    • Conditions:
      • (Ability being cast) Equal to Your_Rest_Ability
      • ((Target unit of ability being cast) is hero) Equal to True
    • Actions:
      • Unit - Set mana of (Target unit of ability being cast) to ((Mana of (Triggering unit)) + 100 )
 
Level 3
Joined
May 18, 2007
Messages
20
Hmm, Thanks raft, But I was talking about when you kill a creep it drops like hides and bodies, I was wondering how they made the system so that you pick them up and bring them to a fire and use the spell cook and they turn into cooked meat. (Edited this to my main post)
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
Simply give the fire the item (the fire should have the inventory skill of course), then when a unit casts Cook or whatever you want it to be, check every item in its inventory (unless you make it with 1 slot), if the item is uncooked something, give it the cooked something.

Its pretty much similiar to the upgrading system I made before a few days so you can look here to see how its done (my system was made for 1 slot however so it needs changes for more then 1 slot).
 
Level 11
Joined
Aug 25, 2006
Messages
971
You don't have to load locust units because theres an already made ability which allows you to load dead units. (Like deer and stuff!) I don't know its name, but its natively owned by the meat wagon.
 
Level 11
Joined
Aug 25, 2006
Messages
971
What you need are some super-basic trigger lessons. I would suggest looking through the tuts. on THW.

Its actually amazingly simple, however if you learned how to do it, you'd know 10x more then if I magically told you.
Heres how it would work. You'd say:
Event: Any unit dies.
Condition Unit Type of dying unit = Unit type of elk
Action Create 6 corpses of elk at position of dying unit.

That leaks a location, but you don't have to understand that yet.
 
Level 3
Joined
May 18, 2007
Messages
20
What you need are some super-basic trigger lessons. I would suggest looking through the tuts. on THW.

Its actually amazingly simple, however if you learned how to do it, you'd know 10x more then if I magically told you.
Heres how it would work. You'd say:
Event: Any unit dies.
Condition Unit Type of dying unit = Unit type of elk
Action Create 6 corpses of elk at position of dying unit.

That leaks a location, but you don't have to understand that yet.
Yes, I understand that, But there is no such action as dropping multiple corpses, It says,
"Create a (unit) corpse for (player) at (point)"
There is not a multiple choice, If there is please enlighten me.
 
Status
Not open for further replies.
Top