• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Food-Counter as Mana-Counter

Status
Not open for further replies.
Level 3
Joined
Jun 27, 2007
Messages
41
Hi,

after playing the newest ENFO MT (I think this was it, or maybe ENFO CE), I was inspired by the new system of watching over the Spellbringers mana.
The map-makers used the food-counter to display the current mana of your spellbringer. Per second one Mana was regenerated in the spellbrigner and so per second you gained one food, so you could see just in your food-counter how much mana your spellbringer had.
Thats a great idea!
I would like to use that idea for a similar problem of my map, but I don't really know how to trigger sth. like this.
Because I ever thought of a food-limit of 300 but they had none and so I tried checking all functions in the WEU, but nothing really worked.
Is this kind of idea a JASS-Triggered one?

Can someone help?

Greetings.
 
Level 11
Joined
Jun 21, 2007
Messages
505
Hey! Glad you haven't frightened to ask for a help.
First you got to make a unit that costs no food, but produces 1.
First you got to make a variable for spellbringer and store it's initial mana value in that variable. Use triggers' event that checks if unit's mana is not equal to the variable. If not, then:
  • Events:
    • Unit - Unit's mana becomes not equal to variable
  • Conditions:
  • Actions
    • Set Variable = (Unit's Mana)
    • If (Number of (units that produce food) greater than Variable) Then do (Remove (Food - Mana) Units-Of-That-Kind) Else do (Create (Mana - Food) Units-Of-That-Kind)
Notes for the trigger above: "Food" means "That Variable you create to store spellbringers's mana in it", "Mana" means "How much mana the spellbringer has"
A player MAY NOT have more food than 300. The so should be with spellbringer's mana.

Use "Advanced" from the top line. "Advanced/Gameplay Constants/" lol
 
Level 17
Joined
Apr 13, 2008
Messages
1,597
Oh, no way, you don't need to create units, uh, just no way, it would lag like hell and there is a function to raise a player's max food cap:

Player / set property food cap or something.

It's sooo possible to set the player's food ceiling over 300 while holding shift in the gameplay constants.
 
Level 5
Joined
May 1, 2006
Messages
131
or just go to the constants and click the little box that says "Use Custom Gameplay Constants".
Then you can go in and change EVERYTHING you want! :D
 
Level 3
Joined
Jun 27, 2007
Messages
41
Hm, okay, thanks to all, I look what I can make.
It seems easy,but I think it won't.

The biggest problem is the Food Limit, wich blizzard sets on 300.
In the Trigger-Functions I dind't find any kind of "Raising the Food Limit"-Trigger.
Is it JASS or something to raise it above 300?
 
Level 11
Joined
Jun 21, 2007
Messages
505
No, it's not a function, you go to "Advanced/Gameplay Constans", check the box, find the line with max food cap, hold "Shift" key and edit that line to set the food limit to any number you want. But I don't know WHEN to hold the shift... You can use trigger function "Player - Set Food Used" or equivalent so set the amount of food used when he actually has no units.

Consider getting this then read what was written by helpful people again.
What's that? Glasses? hmm... very interesting information. But I can't understand what you said, so I assume that you said that thread in wikipedia is more helpful that this thread about Food Counter as Mana Counter...

Creator of this thread, be getting inspired more and make maps! WE WANT TO PLAY GOOD GAMES!
 
Level 17
Joined
Apr 13, 2008
Messages
1,597
*Sigh*
You two, go together.

I was merely implying that 3 people said already that he has to go to Gameplay Constants and change the value by SHIFT-CLICK.

When you are asking for help you should at least put some effort into reading what people replied (people who took their time and effort in exchange for nothing at all).
If you don't, well, that means you don't give a damn about what people say unless they say it for 5 times (it means you are rude).
 
Level 11
Joined
Jun 21, 2007
Messages
505
he just doesn't understand what we say, someone has to tell him in all details what to do as if you were describing a video-tutorial for him. But someone ELSE, I'm out of all this and tired of resultless explaining as if I was talking with a bottle of fanta and luring it to come closer to me so I can catch it and force it to listen to what I'm trying to explain it...
 
Level 3
Joined
Jun 27, 2007
Messages
41
Mkay o_O
I know that I'm not the one, who understands things pretty fast, but anyway thanks for the help.
Now I just have to get the WEU running (damn -.- ), because the normal Editor is stupid and than I will go on with my map.
Thanks to all of you for your help.
 
Status
Not open for further replies.
Top