| 08-07-2006, 01:57 PM | #2 |
About the Icon.. There the string to be something like "ReplaceableTextures\\BTNIcon.blp". The easiest way as I see it would be to make two arrays, one with all the hero unittypes and one with all the according strings. Then what you do is to make a loop that checks which unittype the hero is and add the according string. Did you get that ? EDIT: Seems like I got a lot of time today so I made a test map for you. Since it's a bit unclear what you want you properly want to change it, but it should give you the general idea ! - Soultaker |
| 08-07-2006, 02:07 PM | #3 | |
Quote:
No, there are events for specific units allowing detection of a single unit's life and mana. However, there is no way to globally check every unit for the event. Therefore a periodic check (Every 1 second, ie.) would be the way to go. |
| 08-07-2006, 02:11 PM | #4 | |
You can find the icon paths when you double click a "Art - Interface Icon"(or anything like this) in the Object Editor, in the text field "Custom:". And for the life/mana: 1) Use the "Every 1 seconds", unfortuntely, 'cause: 2) Or you'll have to use a set of "Unit takes damage" "Unit Starts the effect of an ability" "Unit Uses an item" "Unit Aquires an item" "Unit Loses an item" and many other annoying events ;-) Quote:
|
| 08-07-2006, 02:14 PM | #5 | |
Notably, you repeated yourself and answered your own question. Quote:
The 'Unit - Life' and 'Unit - Mana' are specific unit events. Meaning they can't work globally, as I said before. :P Just so you know, here they are. JASS:call TriggerRegisterUnitStateEvent(trig, whichUnit, UNIT_STATE_LIFE, opcode, limitval) call TriggerRegisterUnitStateEvent(trig, whichUnit, UNIT_STATE_MANA, opcode, limitval) |
| 08-07-2006, 02:21 PM | #6 |
I know... But I saw that "Unit - Life"(example, mana as well) was something like "Unit - Unit's Life becomes less than 60.00" Well, I don't think it can reflect changes that're not trapping 60 within(I mean, like if a unit's life became 30 from 50) Or... are you making many many triggers? Dunno if I'm being stupid... ;P Don't get angry at me^_^ |
| 08-07-2006, 02:25 PM | #7 | |
See the 'opcode' argument in the event registrations? Those are > or <, meaning if it goes from 5000 to 1, it will trigger the event if it was set to <4999. (In jass, they're actually 'LESS_THAN' or 'GREATER_THAN', since the actual symbol means nothing) And I was suggesting to NOT use these events, as they are unit specific. Quote:
Hope that clarifies it a bit. :P |
| 08-07-2006, 02:31 PM | #8 |
(*)^)%#@($&)@*%^@$^(*@!#$ I'm confused^^ and 'think that you didn't understand me well let it be not a problem worth mentioning ;-) [and if you really want to clarify it for me, let's use PM^^ Ihave to wait 10 min. between posts. Thanks] |
| 08-07-2006, 10:01 PM | #9 |
ROFL, OK that caused a bit of a confuzling episode. Anyways I guess I'll just have to stick with every 1 second, thnx for the demo map soultaker :D I'll check it out now. EDIT: OK, just one thing, before I can use that, I don't understand the substring bit, what are the numbers for, and what should I be setting them at? I mean the 6, 7 bit at the end of the icon setting action. Trigger: Actions
![]() Multiboard - Set the icon for MultiBoard item in column 1, row 1 to IconStrings[(Integer((Substring((Entered chat string), 6, 7))))] |
| 08-08-2006, 01:37 PM | #10 |
Here, I updated the test map with comments and other stuff that should make it more simple for you. Whatever hero you would need to check just set the "test_Hero" to whatever hero you needs to check and run the "Check" trigger. If you need this in your map, then just copy the "Stuff you need" to your map. - Soultaker |
| 08-08-2006, 02:12 PM | #11 |
For the substring functon, It's like this form::
string substring(string strMain, int intBegin, int intEnd) substring("Wyvernoid", 1, 6)="Wyvern" ^^ substring("AtOmIc_PeAnUt", 8, 13)="PeAnUt" |
| 08-09-2006, 12:32 PM | #12 |
OK, thnx again Soultaker for the demo map. Could any1 explain loop action though, I think I understand it but I'm not certain? :D Does the following thing mean that it will just repeat the action 4 times in a row, each time comparing the next number in the number alphabet ( ) starting at the "from" integer stopping when it gets to the "to" integer?Trigger: For each (Integer A) from 1 to 4, do (Actions)So, lol, would I set it to the same thing as above, but set the second number to the total number of heroes or units in the map that could possibly need to be added to the multiboard? ROFL, As usual, I seem to have over-complexitied something, hope it makes sense ![]() EDIT: It also seems I HAVEN'T actually sorted the life and mana, LOL. I have a trigger which sets an integer variable to the hero's life, and a seperate one for mana. Then sets the text in the multiboard to these values. But the life shows completely the wrong value, and gives it 3 decimal points, and the mana just doesn't show. |
| 08-09-2006, 12:53 PM | #13 | |
Quote:
Yup, this time you were correct :) You should just set the last number to whatever number of heroes you got and create the same thing in the setup trigger. I might help you with the other multiboard problems, but it's my birthday tomorrow so don't expect any help there.. - Soultaker |
