• 🏆 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!

Resetting Upgrade levels

Status
Not open for further replies.
Level 9
Joined
Sep 8, 2004
Messages
633
Hey people, it's been quite a while since i last asked a question here, yet i once again require your aids. :)

I've recently added a "restartgame" option to my map, this can be chosen at the end of the game by voting.
To restart the map succesfully, upgrades need to be reset. Here lies a problem.

I've fixed about everything to reset, all variables, units and triggers. Only the upgrades just won't work.
Here's the trigger action i currently use (which doesn't work):
Code:
For each (Integer A) from 1 to 8, do (Actions)
    Loop - Actions
        Player - Set the current research level of |cffc5dbffWeapon Upgrades to 0 for Player[(Integer A)]
This is only the part for one of ~15 upgrades.

Does anyone know how to fix this? Any way goes, GUI or custom scripts (i can't make the latter myself)

Thanks in advance!
 
Level 3
Joined
Oct 23, 2005
Messages
51
I dunno why it doesn't work, but wouldn't it save time and effort to do a player group trigger instead?
 
Level 9
Joined
Sep 8, 2004
Messages
633
Jaronis, i don't need help on how to form triggers. I'm using variables for each player "Player[x]" in various triggers, this because it wasn't always possible to use player groups. I'll try wheter that's the problem or not.

Apocalypse_dude, i know it's not working... what trigger's description is this you speak of? And as far as i can see, the triggers sais "set the current research level", so i would interpret that as it being able to set the level to any custom amount, disregarding that being a higher or lower number than the previous amount.

Anyone else?
 
Level 9
Joined
Sep 8, 2004
Messages
633
apocalypse_dude said:
The drigger description displayed in the gui ^^

Tech cannot be unlearned through the use of this action
In my opinion it is not possible to downgrade using gui triggers.
I'm not in jass and this stuff,so i wish you good luck ;)

Hmm, never read that. But you're damn right it seems.
Strange though, one would think there's got to be some way to acchieve this. Any jass-experts in the house to take a look?
 
Make it so people can only restart the map 1 time, both for the fact that people would host it more often then but still be happy over being able to restart it and then you could also just do so all research stuff etc. just got exchanged with something that is 100% the same instead of reseting :p

Crappy solution I know, but if everything else fails that would be your only hope I guess xD
 
Level 9
Joined
Sep 8, 2004
Messages
633
Darn.

Asking around i found that it's impossible to lower upgrades. You can only increase them. It's just something left out by blizz because they're lazy.
Basically, i can only increase upgrade levels, not decrease.

Considering the whole fun of the map is based on picking the right upgrades at the right time etc, i've decided to remove the restart option. GG blizz.
 
Level 6
Joined
Feb 18, 2005
Messages
263
maybe you could change the upgrade functionality a little.

e.g. use passiv abilitites that are disabled for each player. (disabled abilities work. but are simply not shown)
Then you could change the upgrade buttons to 'buy unit' and do some triggers like "on buy unit - set var upgrade_foo[y] = x"
and "whenever spawn unit - set level of abiltiy(a) = upgrade_foo(a)"

maybe that could be a way to create a restart function, but avoidung the 'increase only' bug of upgrades...
 
Status
Not open for further replies.
Top