HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Getting Rid Of "Stock" count

03-25-2007, 01:41 AM#1
ClintonM
I'm new to the forums (first post ^^), and I have no idea what I should search for on the forums to answer this question:

Is there any way to hide the "stock" amount from a Tavern that only will have one unit? My custom buttons are "pretty", but the stock/# of 1 go over some of the bottom-left artwork and I want to get rid of that.

Is there a simple configuration that I'm overlooking or do I have to script it in using JASS (or whatever it's called ^^)?

Thanks in advance, even if it's not possible.

~ Clint
03-25-2007, 01:45 AM#2
Earth-Fury
I don't think its at all possible to remove it.

And it would be... impossible? to trigger, as you can not detect which player uses an ability on a neutrally owned shop.

And welcome to WC3C! =)
03-25-2007, 01:52 AM#3
ClintonM
Thanks for the welcome ^^.

Would it be possible if I made separate shops for each player? It wouldn't affect the way my map is played at all considering each player would have their own separate shop anyway.
03-25-2007, 01:58 AM#4
Earth-Fury
If each player controls their own shop, it would be verry easy. You simply make abilitys for all the heros / items you want sellable, and detect when they are cast by the shop.

As for JASS, check my sig for some tutorials ^^ I highly recomend you learn it
03-25-2007, 02:03 AM#5
ClintonM
So you would have to make 2 clicks instead of 1 keyboard stroke as I intend (my map will become clear in a week or so probably ;)), I'll probably just stick with the buttons over them unless there's a way to instantly cast on self and have triggers able to take notice to this to carry on an action...
03-25-2007, 02:08 AM#6
Pyrogasm
Use the "Channel" ability. You can set it to instantly cast when clicked; and you could use a hotkey for it to save a mouse click.

Tutorial here; scroll down about half-way through the first post.
03-25-2007, 02:09 AM#7
Earth-Fury
Of course there is! =) Base an ability off something with no tarket, like roar. Then make a trigger with an event to detect ability castings and a condition to ensure its a shop casting the roar ability. then do stuff like subtract gold and make units in the actions section.

but that is quite a hassle. Personally, i would stick with a bit less art over that much work ;)

There may be a method i haven't thoght of, tho.

Ohhh, you could just make it train units and limit the training of them via triggers.

Edit: Damn you Pyro!!! You haven't seen the last of me! >.<
03-25-2007, 02:13 AM#8
ClintonM
I'll give both of them a shot, I kind of like the "channel" spell that Pyrogasm directed me to. As I read it, I think that you don't actually see anything happen, it's just detectable by triggers. That's pretty much what I wanted, I'll try both out if Channel isn't what I think it is.

Thanks ^^

I just noticed you have to wait a full 10 minutes to post O.o... +Rep to you both for helping so fast! ^^
03-25-2007, 02:30 AM#9
ClintonM
Heh, actually after looking at Channel longer, Earth-Fury's is the only one that would work. There is not going to be any hero spawn at all anyway so he actually helped the triggering phase out by making them even easier! ^^
03-25-2007, 02:35 AM#10
Earth-Fury
channel is actually just what you need.

you see, its an ability that does nothing. but it lets you change its order ID. Which is important for one reson: No 2 abilitys on a single unit can share an order ID. Try giving a unit holy light and a copy of holy light. it doesnt work.

Channel also lets you do things like change it to a targeted spell (click the ability / hotkey then target), an instant spell (just click the ability button) ext. Which is also nice.
03-25-2007, 02:41 AM#11
ClintonM
lol, I was just coming back to post "nevermind, channel would work better" after fiddling with the Object Editor. I thought I couldn't change it to a "unit" ability from a "hero" ability, keep in mind I'm a mapper coming from StarCraft so all this ability to buildings/any unit is new to me ;).

~ Clint
03-25-2007, 05:36 AM#12
Pyrogasm
Quote:
Originally Posted by Earth-Fury
Edit: Damn you Pyro!!! You haven't seen the last of me! >.<
I'm sure I haven't, my canadian arch-nemesis...

Quote:
Originally Posted by ClintonM
I just noticed you have to wait a full 10 minutes to post O.o... +Rep to you both for helping so fast! ^^
The "600 seconds between posts" thing is only active for the first month after you join the website. After that first month, you may post whenever and wherever you please.

Which brings me to another point: try to avoid double-posting (see posts number 8 and 9 of this thread). The "Edit" button exists for a reason. If I remember correctly, you can edit posts before your 600 seconds is up, which is rather handy.

As Earth-Fury has correctly pointed out, you can change the OrderId of channel, thus enabling multiple abilities based off of channel to co-exist on the same unit. Additionally, you may now order your building/unit to cast these abilities and train units in the event that something needs to be chosen without the player's consent. Just remember to order the unit to use the spell with the OrderId that you changed channel's to.


Lastly, it seems as though you're getting off to a good start. Most people don't have the sense to rep people that help them, and for that I thank you.

(That, and not spamming smilies )
03-25-2007, 11:48 PM#13
ClintonM
Thanks, but this brings me to my second question about Channel that you already pretty much answered, but I'll post this just in case I can't get it working in the next few minutes:

How do you make a "toggle" spell (like bearform) that lasts forever with the Channel Spell? I can't even get Channel to toggle in the first place, so that could use some answering too ^.^.

Thanks again guys.

~ Clint
03-26-2007, 12:35 AM#14
Pyrogasm
Well, you could make it toggleable if it were a unit ability very easily. Just detect when a unit uses it, do you effects, and then replace the ability with the "on" version. Just make sure they have the same coordinates, etc.

For a hero ability, you would have to use something like immolation that does no damage and costs no mana per second. Then you'd have to detect when a unit is ordered to turn it on/off like so:
Trigger:
Collapse Events
Unit - A unit is issued an order with no target
Collapse Conditions
(String (Issued Order) equal to immolation) or (String (Issued Order) equal to unimmolation)
Collapse Actions
Collapse If (All conditions are true) then do (Then actions) else do (else actions)
Collapse If - Conditions
String (Issued Order) equal to immolation)
Collapse Then - Actions
---- Do your actions for toggling it on here ----
Collapse Else - Actions
---- Do your actions for toggling it off here ----
03-26-2007, 12:47 AM#15
ClintonM
I'm a little confused here, but I'll give that a shot.

What I mean to say is, I have the art set to have (A)Art For the turn on image and (B)Art for the turn off image and I want them to toggle whenever I push the button as well as being detectable by triggers.

The triggers part I believe you answered, but I can't get (A)Art and (B)Art to change when the button is pushed. I guess this can be solved in the abilities tab of the Object Editor, but I'm unfamiliar with the values.

~ Clint