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

Unit Stock Problem

Status
Not open for further replies.
Level 5
Joined
May 12, 2014
Messages
133
Hi guys! So I'm currently working on a spell for a hero called Refraction Blade. Tooltip below, but it's not really important.
The Blader skillfully wields her weapons, manipulating up to 5 of them at once. Each dagger grants the Blader bonus armor, and increases the power of her spells. Daggers only lasts for a while.

Level 1 - 1 armor, 10 seconds
Level 2 - 2 armor, 15 seconds
Level 3 - 3 armor, 20 seconds
Level 4 - 4 armor, 25 seconds
Level 5 - 5 armor, 30 seconds

Target Type: Instant
Damage Type: N/A
Cooldown: 2
Mana Cost: 8/7/6/5/4


The real problem is what's next. In order to keep track of how many daggers the Blader has out, I gave her units in stock to show the number in the corner. In general it looks good, but there are 2 problems with it.

1) How can I stop her from being able to "buy" the unit so that the map doesnt get flooded with invisible units and the "out of stock" message doesn't appear? I don't want to add a requirement since that would just darken the icon, and an ugly "requires" thing would appear.

2) I figured out how to get the "out of stock" to disappear from the tooltip if the current stock of units is 0, but now there is an ugly space. Am i able to get rid of that entirely?

UnitStockProblem.jpg


Note: Remember that the thing the mouse is pointing to in the image is not a spell, but a unit. I'd prefer not to replace it with 5 spells with different icons, because I have at least one other spell that has something similar with units in stock to represent something, and THAT spell has reached past 300 in a recent test.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
So you want an ability that increases armor for a duration that stacks.
So at level 5 you can have 25 armor.

1. Does the duration reset?
So when you cast it, you gain a dagger for 30 seconds.
After 15 seconds you cast it again. Your armor is now increased by 10.
Does the first one disappear after 15 seconds or do they both go after 30 seconds?

2. Is there any other limitation on this spell? (Exept mana)
Why would a player not spamm this ability granting a continous 25 armor bonus?

(I just made a similar ability one minute ago:
"Every time the paladin is hit, he gains 2 armor and 20 maximum health for 6 seconds stacking up to 10 times."
It is an example in my Effect Over Time System)
 
Level 5
Joined
May 12, 2014
Messages
133
So you want an ability that increases armor for a duration that stacks.
So at level 5 you can have 25 armor.

1. Does the duration reset?
So when you cast it, you gain a dagger for 30 seconds.
After 15 seconds you cast it again. Your armor is now increased by 10.
Does the first one disappear after 15 seconds or do they both go after 30 seconds?

2. Is there any other limitation on this spell? (Exept mana)
Why would a player not spamm this ability granting a continous 25 armor bonus?

(I just made a similar ability one minute ago:
"Every time the paladin is hit, he gains 2 armor and 20 maximum health for 6 seconds stacking up to 10 times."
It is an example in my Effect Over Time System)

I think you're misunderstanding my problem. It has nothing to do with the spell itself, but rather the "unit" I gave to the Blader. If you look at the picture, there is a passive Icon that the mouse is hovering over. That is actually a unit that you can buy (like buying mercenaries from a mercenary camp). The problem is that if a person is stupid enough, they can forever click to buy that unit, and the map becomes full of invisible units, causing lag after some time. The next problem with it is when it's at 0. If it's 0 and someone clicks to buy the unit, it will say "out of stock". That is really ugly imo since it's suppose to just show how many daggers you have, and not much else. The third problem is also when the stock is at 0. When you hover the mouse over the icon, it will normally say "out of stock" right below the name. I managed to get rid of that, but now there is an ugly space that only appears when it's at 0. If it still doesn't make sense, I can just post up my map and you can have a look for yourself. I honestly have no problems with sharing it since it's very incomplete and ugly. :goblin_good_job:

When you first learn the spell, you start off with 0 daggers. By casting the spell, you gain 1 dagger, and bonus armor. Each time you cast the spell, you get a new dagger (up to 5 at a time, so up to 25 bonus armor at level 5). Each dagger has its own timer, so if you waited 29 seconds after getting the 1st dagger to get a 2nd one, the 1st one would disappear 1 second later. But if you're already at 5 daggers, the one with the lowest remaining time would be have its time refreshed. So, it's basically a priority to try and keep 5 daggers up at once to maximize the potential of your other spells and your defense. There really isn't a reason why someone wouldn't spam it, except for mana of course, since that's the point of a low cooldown. Oh, and don't say that it seems too strong, as you haven't even seen any of the other spells in this map yet *cough *cough too overpowered.

I'm not having any problems making this spell (except for pure laziness, but who honestly doesn't have that problem??).
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
You can order the unit to stop on the "sells a unit" event... at least you could try.
If that wont stop the unit from selling then remove the unit once it is sold?

I would indeed make abilities with a nice number on their icon.
But you said you don't want that.
 
Level 5
Joined
May 12, 2014
Messages
133
You can order the unit to stop on the "sells a unit" event... at least you could try.
If that wont stop the unit from selling then remove the unit once it is sold?

I would indeed make abilities with a nice number on their icon.
But you said you don't want that.

Ok, I have to say this right now. You are pretty fast man, seriously.

Anyway, I just tried it out, and it sort of worked. The trigger would actually run when the unit is "sold". But ordering the buying/selling/sold unit to stop did nothing. So far, my temporarily solution is just to remove the sold unit, but I read somewhere that units will always permanently leak, even if you get rid of them. Small leak, but if I just absolutely have to ignore it, then I will. But even then there's still the problem of the "out of stock" messages.
 
Level 5
Joined
May 12, 2014
Messages
133
It might be that it is also in an order.
"A unit is issued an order with no target."
If that order is that unit, and you make the triggering unit stop (cannot be done immediately so you need a 0 second timer) then it might work.

You have blown my mind man. While ordering the unit to stop didn't work, I removed the unit from him when the trigger activates, and the dummy unit doesn't appear. You solved one of my problems man, and that was probably the biggest one. I'm on my phone atm, so I can't post what I did yet. But expect that later. +rep man

Now it would be nice to figure out how to fix the other problems, but those are just small unimportant ones.
 
Level 5
Joined
May 12, 2014
Messages
133
Also you can remove the "Out of Stock" error by digging it up in

Advanced>Game Interface

Then replace the error with a space " " boom! No more error msg. However you still are left with an error sound. But there is no real need to remove that. Btw the unit stock idea is very creative!
attachment.php

Thank you for the compliment. :goblin_sleep:

Anyway, I think you're only half right. I searched through the game interface stuff before, and I found that spot (or something similar). It gets rid of the "out of stock" message on the tooltip, but it doesn't make the error message on the screen disappear. Of course, I could be wrong. When I get back home (I'm in school right now) I'll try searching through again and let you know what I find. Thanks for taking a moment to check out my problems. :thumbs_up:
 
Level 5
Joined
May 12, 2014
Messages
133
Wow you are fast. I still haven't even left school yet! But I'm pretty confident that you could be right. I owe you a point of rep for that since I couldn't find it myself. :grin:


Holy crap man, I freaking love MineralZ. I'm practically freaking out that you responded to one of my problems. TEACH ME HOW TO BE GOOD AT IT! I've only made it to wave 20 at most, and that's through abusing wave 10!
 
Status
Not open for further replies.
Top