• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Custom Stats using GUI

Status
Not open for further replies.
Level 12
Joined
Jan 30, 2009
Messages
1,067
Hello, everyone.

I'm in need of some more help.

this time regarding custom stats, as mentioned above.

The only thing I could drudge up on the forums was a post that was a response to another question of mine, pointing me to a vJass system called +bonusmod or something. That's not going to work for me.

I need to have a custom stat system that's in GUI, that I can mold to my will. I have a feeling this is really quite simple, seeing as how there's not even a tutorial on how to do this, but I simply cannot think of a way to go about doing this. Obviously an integer counter, but there's gotta be more than that.

For some more information, this is for a custom campaign. Single-player. Doesn't need to be MPI, just needs to work for any unit I wish to set it to.

For now, lets just have it set to work on up to 5 heroes owned by player 1.

I can probably figure it out after that.

Thanks for the help, :)
 

Vunjo

Hosted Project: SC
Level 14
Joined
Jul 1, 2010
Messages
1,340
If I get it right, you want to increase damage, health, armor.... with triggers right?
If that is so, then read this carefully. Make Custom abilities (unit or item) that increases health, damage or whatever you need. Add ability to a unit, and simply level it up with triggers. If you need something like +10 DMG Bonus per 50 Intelligence, then do this:

[trigger=My Trigger]
Actions
Unit - Create 1 Unit for (Owner of (Trigg Unit)) at (Position of (Trigg Unit)) facing (Position of (Trigg Unit))
Set pets[(Player number of (Owner of (Trigg)))] = (Last created unit)
Set asdf = ((Intelligence of (Casting Unit) (Include bonuses)) / 50)
Set asdf = (Min(asdf, 99))
Unit - Set level of summondmg for pets[(Player number of (Owner of (Trigg)))] to asdf
Unit - Set level of summonhp for pets[(Player number of (Owner of (Trigg)))] to asdf
Unit - Set level of summonsc for pets[(Player number of (Owner of (Trigg)))] to asdf
Unit - Set level of summonua for pets[(Player number of (Owner of (Trigg)))] to asdf[/trigger]

I just copied it from my map, I don't rly understand it cause my brother made it for me ^^
Anyway, you got the idea, if you understand it.
This will summon a unit, set variables to "casting unit" (only if you have spells to cast) Intelligence, and simply lvl up the ability of last created unit.
 
Level 12
Joined
Jan 30, 2009
Messages
1,067
That's not what i'm trying to do. I'm trying to make a completely custom stat. For now, lets say "Speed" is the name. It has nothing to do with movement speed or attack speed, it's 100% triggered.

Kinda like TKoK

More like a custom value of a unit than an ability (Although i don't believe that is a good analogy, it's the first that came to my mind).
 
Level 12
Joined
Jan 30, 2009
Messages
1,067
Speed is mostly just a reference.

You know how in RPGs you have "Speed" to determine the order in which you would perform your turns? That's basically what this is all about. For this one.

It just needs to be a reference, basically, just to order it from greatest to least.

It has no actual effect as for the character itself other than determining the turn order.
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Store the "speed" into hashtable or an array.

Then you can use countdown timers. Start them and catch the expiring timer. When a timer expires, pause all timers and when the turn is over, resume the timers and restart the expired timer.

With hashtables it's easy to detect the unit whose timer expires. Just save the handle of the unit to the timer, and then load it.

I've done this kind of turn based timer system, and it works nicely.
 
Status
Not open for further replies.
Top