wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Warcraft III Modding > Developer's Corner > General Development
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 10-18-2009, 01:04 AM   #1
Panto
LASER DRAGONS IS RELEASED
 
Panto's Avatar


Development Moderator
User Project: Panto
 
Join Date: Mar 2003
Posts: 3,167

Submissions (2)

Panto is a jewel in the rough (247)Panto is a jewel in the rough (247)Panto is a jewel in the rough (247)Panto is a jewel in the rough (247)Panto is a jewel in the rough (247)

Approved Map: Call to Arms

Default Variable Life

Greetings.

A set of units on the map needs to have variable life maximums.
I'm looking for suggestions. Here's what I need to end up with.

The units' life max will start around 50. As the map progresses, new units will start with more life, periodically. So after 5 minutes, they will have 75 max life. After 10 minutes, say, they'll have 100 life, and so on.

However, as the result of an event, all the new units' life maximums will drop to their original level of 50 and start the progression over. This could happen any number of times.

I can't use upgrades because they can't be unlearnt. I can't use a multi-level Item Life Bonus ability, as far as I can tell, because that ability can't have its level adjusted, at least not via triggers (so it will always have whatever the level 1 bonus is). I can't add more Item Life Bonus abilities because they don't appear to stack.

What I'm coming down to is making an array of separate Item Life Bonus abilities with one level each, and adding the appropriate one using a trigger when the unit is created. This is pretty crude, so I'm looking for another route. Any suggestions?

Thanks.
__________________
Pantokrator Maps forum.
LASER DRAGONS RELEASED!.
"One good test is worth a thousand expert opinions." Wernher von Braun
"The perfect is the enemy of the good." Voltaire
"When I became a man I put away childish things, including the fear of childishness and the desire to be very grown up." C.S. Lewis
Panto is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 10-18-2009, 01:12 AM   #2
PAnZuRiEL
User
 
Join Date: Oct 2009
Posts: 4

PAnZuRiEL has little to show at this moment (0)

Default

How about giving them a large HP value and no regen? Then you can use triggers to set their remaining life at the moment they're spawned. You'll need (at least) two triggers: one to adjust the value of the "life" variable integer according to elapsed game time, and a separate one that spawns them whenever it's supposed to and then immediately sets the life of the newly spawned unit to the current value of the variable.
PAnZuRiEL is offline   Reply With Quote
Old 10-18-2009, 01:19 AM   #3
Panto
LASER DRAGONS IS RELEASED
 
Panto's Avatar


Development Moderator
User Project: Panto
 
Join Date: Mar 2003
Posts: 3,167

Submissions (2)

Panto is a jewel in the rough (247)Panto is a jewel in the rough (247)Panto is a jewel in the rough (247)Panto is a jewel in the rough (247)Panto is a jewel in the rough (247)

Approved Map: Call to Arms

Default

That's good, but unclean. It's kinda unpolished to have damaged units for no obvious reason, and it makes the life bar much harder for the player to read accurately, since a unit might have some 2000 max life possible (just as a guess) but only 50 life at the moment. Also, any healing on those units will cause them to exceed their fake maximum.

In the end, I don't think it's justifiable to use actual life instead of max life.
__________________
Pantokrator Maps forum.
LASER DRAGONS RELEASED!.
"One good test is worth a thousand expert opinions." Wernher von Braun
"The perfect is the enemy of the good." Voltaire
"When I became a man I put away childish things, including the fear of childishness and the desire to be very grown up." C.S. Lewis
Panto is offline   Reply With Quote
Old 10-18-2009, 03:13 AM   #4
Alevice
It feels good
 
Alevice's Avatar
 
Join Date: Mar 2006
Posts: 1,305

Alevice is a jewel in the rough (190)Alevice is a jewel in the rough (190)Alevice is a jewel in the rough (190)

Default

Why not use those UnitMaxState systems around?
__________________
_-|-_

Alevice.jones is SC2 Beta, losers.

Check out my never updated deviantart gallery!!

Kalimdor Raiders (Race Contest #1) Pastebin Page
Cavern Crawlers (Race Contest #2) Pastebin Page
Airship Race Motherfuckers!
Quote:
Originally Posted by http://ajaxian.com/archives/would-you-like-a-_-with-that-new-library-gives-js-what-it-should-have#comment-276203
- Dont solve problems that dont exist.
- Improve the wheel, dont reinvent it.
- Port the wheel if it doesnt exist in your environment.
- Integrate the wheel into your project.
- Make sure you can replace your wooden wheel for a rubber one if someone else invents it.
Alevice is offline   Reply With Quote
Old 10-18-2009, 06:10 AM   #5
Panto
LASER DRAGONS IS RELEASED
 
Panto's Avatar


Development Moderator
User Project: Panto
 
Join Date: Mar 2003
Posts: 3,167

Submissions (2)

Panto is a jewel in the rough (247)Panto is a jewel in the rough (247)Panto is a jewel in the rough (247)Panto is a jewel in the rough (247)Panto is a jewel in the rough (247)

Approved Map: Call to Arms

Default

Do I need to adopt an entire system? Do you know what the important elements might be in changing a unit's max life, that's used in one of those systems?
__________________
Pantokrator Maps forum.
LASER DRAGONS RELEASED!.
"One good test is worth a thousand expert opinions." Wernher von Braun
"The perfect is the enemy of the good." Voltaire
"When I became a man I put away childish things, including the fear of childishness and the desire to be very grown up." C.S. Lewis
Panto is offline   Reply With Quote
Old 10-18-2009, 06:32 AM   #6
Earth-Fury
Two Blue
 
Earth-Fury's Avatar
 
Join Date: Mar 2003
Posts: 2,179

Submissions (7)

Earth-Fury is just really nice (343)Earth-Fury is just really nice (343)Earth-Fury is just really nice (343)Earth-Fury is just really nice (343)

Send a message via MSN to Earth-Fury
Default

http://www.wc3c.net/showthread.php?t=107451

I know. Because I wrote it. :)

I think the documentation for that script should have all the information you need. If not, please do ask.

Also, it's a CnP thing to use UnitMaxState... It also operates, basically, as fast as is possible for values down to a granularity of 1. It's also a single function call to change a unit's max state. But it's your choice if you wanna recode it specifically for your purposes.
__________________
Useful Links:
My Resources:
Good Resources:
Search
Tutorials
Ability Guide

UnitMaxState
BonusMod

AutoIndex
ARGB
TimerUtils

Earth-Fury is offline   Reply With Quote
Old 10-18-2009, 06:32 AM   #7
Alevice
It feels good
 
Alevice's Avatar
 
Join Date: Mar 2006
Posts: 1,305

Alevice is a jewel in the rough (190)Alevice is a jewel in the rough (190)Alevice is a jewel in the rough (190)

Default

Rather than pretend knowing about it, I'd link you to relevant info:

http://www.wc3c.net/showthread.php?t=80491
http://www.hiveworkshop.com/forums/j...axstate-65622/
http://www.wc3c.net/showthread.php?t=107795
http://www.wc3c.net/showthread.php?t=107451

edit: fuckyou ef
__________________
_-|-_

Alevice.jones is SC2 Beta, losers.

Check out my never updated deviantart gallery!!

Kalimdor Raiders (Race Contest #1) Pastebin Page
Cavern Crawlers (Race Contest #2) Pastebin Page
Airship Race Motherfuckers!
Quote:
Originally Posted by http://ajaxian.com/archives/would-you-like-a-_-with-that-new-library-gives-js-what-it-should-have#comment-276203
- Dont solve problems that dont exist.
- Improve the wheel, dont reinvent it.
- Port the wheel if it doesnt exist in your environment.
- Integrate the wheel into your project.
- Make sure you can replace your wooden wheel for a rubber one if someone else invents it.

Last edited by Alevice : 10-18-2009 at 06:33 AM.
Alevice is offline   Reply With Quote
Old 10-18-2009, 09:45 PM   #8
Panto
LASER DRAGONS IS RELEASED
 
Panto's Avatar


Development Moderator
User Project: Panto
 
Join Date: Mar 2003
Posts: 3,167

Submissions (2)

Panto is a jewel in the rough (247)Panto is a jewel in the rough (247)Panto is a jewel in the rough (247)Panto is a jewel in the rough (247)Panto is a jewel in the rough (247)

Approved Map: Call to Arms

Default

Super, thanks guys! I'll dig in.

EDIT: FYI, so the treat at the heart of all this is that the Item Life Bonus ability is bugged. At levels above 1, it doesn't add the life the way it's supposed to. But if it's removed, it does successfully subtract the life. So if you set the life gained to a negative value, when you add and remove the ability at that level, it winds up gaining the life.

<3 Blizzard. Am I being sarcastic?
__________________
Pantokrator Maps forum.
LASER DRAGONS RELEASED!.
"One good test is worth a thousand expert opinions." Wernher von Braun
"The perfect is the enemy of the good." Voltaire
"When I became a man I put away childish things, including the fear of childishness and the desire to be very grown up." C.S. Lewis

Last edited by Panto : 10-18-2009 at 09:56 PM.
Panto is offline   Reply With Quote
Old 10-20-2009, 03:24 AM   #9
Gorman
.▲▼▲&#9
 
Gorman's Avatar
 
Join Date: Apr 2007
Posts: 1,087

Submissions (2)

Gorman will become famous soon enough (70)Gorman will become famous soon enough (70)Gorman will become famous soon enough (70)

Send a message via MSN to Gorman
Default

So, for those playing at home, your system will just use -ve value life bonus skills to up the life to whatever you need, then reduce it using +ve values?
__________________
Gorman is offline   Reply With Quote
Old 10-20-2009, 10:00 PM   #10
Panto
LASER DRAGONS IS RELEASED
 
Panto's Avatar


Development Moderator
User Project: Panto
 
Join Date: Mar 2003
Posts: 3,167

Submissions (2)

Panto is a jewel in the rough (247)Panto is a jewel in the rough (247)Panto is a jewel in the rough (247)Panto is a jewel in the rough (247)Panto is a jewel in the rough (247)

Approved Map: Call to Arms

Default

Not quite exactly. It will add an ability that doesn't work properly. So adding the negative life won't actually do anything at all. But when the ability's removed, it does correctly change the life back, so it will remove the negative life, thus resulting in a permanent life bonus.
__________________
Pantokrator Maps forum.
LASER DRAGONS RELEASED!.
"One good test is worth a thousand expert opinions." Wernher von Braun
"The perfect is the enemy of the good." Voltaire
"When I became a man I put away childish things, including the fear of childishness and the desire to be very grown up." C.S. Lewis
Panto is offline   Reply With Quote
Old 10-20-2009, 11:32 PM   #11
Ignitedstar
Moderator
 
Ignitedstar's Avatar


RP Section Moderator
 
Join Date: Jul 2005
Posts: 1,755

Ignitedstar has a spectacular aura about (102)Ignitedstar has a spectacular aura about (102)Ignitedstar has a spectacular aura about (102)Ignitedstar has a spectacular aura about (102)

Send a message via MSN to Ignitedstar Send a message via Yahoo to Ignitedstar
Default

That's interesting. This is referring to ordinary units and not heroes, right? (where negative Strength removes health)

Item Life Bonus doesn't work properly with a negative value, huh... Even when using shift+enter? Now that I think about it, I've actually never tried (or even thought about) using Item Life Bonus with negative numbers.
__________________
Current Activity: It's a secret, now.
Evaluation: I actually logged in?!?!
"If I speak in the tongues of men and of angels, but have not love,
I am only a resounding gong or a clanging cymbal.
If I have the gift of prophecy and can fathom all mysteries and all knowledge,
and if I have a faith that can move mountains, but have not love, I am nothing."

1 Corinthians 13:1-2

Current Works:
None.

Last edited by Ignitedstar : 10-20-2009 at 11:33 PM.
Ignitedstar is offline   Reply With Quote
Old 10-21-2009, 12:16 AM   #12
Earth-Fury
Two Blue
 
Earth-Fury's Avatar
 
Join Date: Mar 2003
Posts: 2,179

Submissions (7)

Earth-Fury is just really nice (343)Earth-Fury is just really nice (343)Earth-Fury is just really nice (343)Earth-Fury is just really nice (343)

Send a message via MSN to Earth-Fury
Default

Ok then... time to explain really, really clearly...

Examples:

1:
Example ability: Based off Item Life Bonus. Has 2 levels. Level 1 has a bonus life of 10. Level 2 has a bonus life of 20.

You add the ability to a unit. It gains 10 life.
You set the level of the ability to 2. The unit loses the 10 bonus life.
The unit does not gain 20 bonus life. BUG.
You remove the ability from the unit. The unit loses 20 life.

2:
Example ability: Based off Item Life Bonus. Has 2 levels. Level 1 has a bonus life of 0. Level 2 has a bonus life of -10.

You add the ability to a unit. It gains 0 life.
You set the level of the ability to 2. It loses 0 life.
The unit does not lose 10 life. BUG.
You remove the ability. The unit loses -10 life. --10 = 10, thus the unit gains 10 life.
__________________
Useful Links:
My Resources:
Good Resources:
Search
Tutorials
Ability Guide

UnitMaxState
BonusMod

AutoIndex
ARGB
TimerUtils

Earth-Fury is offline   Reply With Quote
Old 10-21-2009, 12:19 AM   #13
Panto
LASER DRAGONS IS RELEASED
 
Panto's Avatar


Development Moderator
User Project: Panto
 
Join Date: Mar 2003
Posts: 3,167

Submissions (2)

Panto is a jewel in the rough (247)Panto is a jewel in the rough (247)Panto is a jewel in the rough (247)Panto is a jewel in the rough (247)Panto is a jewel in the rough (247)

Approved Map: Call to Arms

Default

Perfectly well said, E-F.
__________________
Pantokrator Maps forum.
LASER DRAGONS RELEASED!.
"One good test is worth a thousand expert opinions." Wernher von Braun
"The perfect is the enemy of the good." Voltaire
"When I became a man I put away childish things, including the fear of childishness and the desire to be very grown up." C.S. Lewis
Panto is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 10:38 PM.


Affiliates
The Hubb The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2019, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services