| 05-03-2008, 11:09 AM | #1 |
I have lately been fiddling around with making a build system based on the spell book and Tiny Castle ability, and though so far I have managed to replicate the looks of a normal Build tab, as well as have the Tiny Castle ability taking costs from your resource supply.. there is one thing I cannot work out, due to not knowing whether it is possible. I am wanting to be able to add the small gold and lumber icons which appear when you try purchasing a normal building (the small coin and tree icon). My plan was to edit the Text-tooltip to have it, possibly by writing a command or something for them to show. Problem is, I have no idea if it is even possible to have icons appearing in a text-tooltip, let alone what the command for doing so would be. I know this is poorly phrased, but any help on this topic would be wonderful. Thanks in advance. |
| 05-03-2008, 11:29 AM | #2 |
You can't add icons to tooltips... you could try using the Charge Gold and Lumber ability, but then you lose the building placement stuff from the tiny castle ability. |
| 05-03-2008, 11:37 AM | #3 |
Nay, that would not get the desired effect. I can already get using Tiny Castle to make the player lose gold and lumber, as a normal building does. Just not add the little icons to give it that authentic air. |
| 05-03-2008, 11:41 AM | #4 |
Charge gold and lumber has the icons.. |
| 05-03-2008, 11:42 AM | #5 |
But does not create buildings. |
| 05-03-2008, 11:44 AM | #6 |
Detect cast of charge Gold and Lumber ability Create dummy unit with the Create Tiny Building ability Force UI press If the dummy unit cancels -> refund cost If the building is created -> Kill the dummy That's the best way I can think of to get the icons. |
| 05-03-2008, 12:33 PM | #7 |
I tried making that trigger, and.. well, I failed miserably. Would you be able to give a more exact trigger to help me out? My own was: Trigger: Untitled Trigger 001Obelisk being the name of the new Tiny Castle ability. It does not work. All it does is remove gold from my resources, does not make the dummy unit, does not build an obelisk. |
| 05-03-2008, 12:53 PM | #8 |
You are going to struggle to make it in GUI; I would say it isn't really worth the effort just to get icons.. If you are interested & willing to do the work to learn JASS; have a look at this spell by pyrogasm; it deals with the force UI/detecting cancels etc. |
| 05-03-2008, 12:59 PM | #9 |
Mmmm, well, I will pass on JASS for now. As you likely guessed, I have only just started triggering.. for now, I will stick with my previous method of building and lack the icons; afterall, I can always just mention the costs in the tooltip. If this turns into a fully fledged mod, I will definately attempt this again, to get a more authentic feel. Thanks for all the help! |
| 05-10-2008, 02:43 AM | #10 |
Cancel detection is a pain in the ass because of the stupid 1-frame update thing. |
