Staredit Network

Staredit Network -> UMS Assistance -> Displaying #'s
Report, edit, etc...Posted by Oo.l3ahamut.oO on 2007-02-01 at 20:31:25
I am making a map where the player has a dc that determines there damage. Now atm I have no real way of showing the dc # due to the fact I cant set a variable in the display text message action on MA's trigger duplicater.

I would simply do it by hand if it was only 50-100 but I'm dealing with the need for 9999 triggers 1-9999 so doing each individually isnt an option. The only other thing I can think to do is have an area where each person has 4 columns 0-9 and then show text based on where a unit is on the grid like...

- - - - - - Digits - 1 - - 2 - - 3 - - 4 -
Number - - - - - -0 - - 4 - - 2 - - 1 -
- - - - - - - - - - - 5 - - 3 - - 0 - - 9 -

Basically the first is 421 damage and second is 5309. But the problem is it would display in the text message like...

5
3
0
9

I would prefer to have it display in just 1 line of text... so if anyone has an idea of how I might be able to achieve that your help/ideas would be appreciated.
Report, edit, etc...Posted by fritfrat(U) on 2007-02-01 at 21:04:11
I suggest having a piece of terrain where you have 4 rectangles, and you just create buildings the shapes of numbers in them so the damage shows up on the minimap. It would take a lot of effort to elaborate how to create this system, so please mention if this is what you would like me to do.

Because ya, to answer your question, you can't combine different strings on the same line.
Report, edit, etc...Posted by Oo.l3ahamut.oO on 2007-02-01 at 21:42:56
QUOTE(fritfrat(U) @ Feb 1 2007, 09:04 PM)
I suggest having a piece of terrain where you have 4 rectangles, and you just create buildings the shapes of numbers in them so the damage shows up on the minimap. It would take a lot of effort to elaborate how to create this system, so please mention if this is what you would like me to do.

Because ya, to answer your question, you can't combine different strings on the same line.
[right][snapback]621917[/snapback][/right]


perhaps, that is a possibility as well. If nothing else comes up I might put this method to use. But that would still take alot of triggers...

10 for 1st digit
100? for 2nd digit
1000? for 3rd
and
10000? for 4th

If I am correct that would take more triggers than doing just 1-9999
which means my grid system would also prove inaffective...

[Edit]
unless... I never actually add the number together just make each segment like 1 is 9000 and another would be 50 and the last would be 9 = 9059

Idk im still trying to brainstorm
Report, edit, etc...Posted by PCFredZ on 2007-02-01 at 21:48:05
How about using minerals and gas for a visual representation? They update quickly and can be directly set/added/subtracted by triggers.
Report, edit, etc...Posted by Oo.l3ahamut.oO on 2007-02-01 at 21:51:54
QUOTE(PCFredZ @ Feb 1 2007, 09:48 PM)
How about using minerals and gas for a visual representation? They update quickly and can be directly set/added/subtracted by triggers.
[right][snapback]621950[/snapback][/right]


yeah I had thought about that while I was typing the last post but I need minerals for money and gas for MP... because I already have experiance, current level and HP cycling on the leaderboards I dont really want to add more to it.
Report, edit, etc...Posted by Koltz on 2007-02-01 at 22:02:30
This system will display ur attack amount in a mineral patch


Okay so, U have their DC= X
Then u have a counter = Y

Condition:
Switch 'Determine attack' is set
Deaths of X at least 1

-------

Modify resource amount in mineral field: add one
subtract 1 death of X
Add 1 death of y
preserve


THEN:

Condition:
Switching 'Determin....' is set
Deaths exactly 0 of X

-------

Clear 'determine...'
Set 'Binary Cutoff'


THEN:

Binary CUtoff is set
Deaths at least 512 of Y

-------

Subtract 512 of Y
add 512 to X


etc..

Hope u understand, I helped u with ur turn-based system before ;P

Report, edit, etc...Posted by Oo.l3ahamut.oO on 2007-02-01 at 22:10:44
QUOTE(Koltz @ Feb 1 2007, 10:02 PM)
This system will display ur attack amount in a mineral patch
Okay so, U have their DC= X
Then u have a counter = Y

Condition:
Switch 'Determine attack' is set
Deaths of X at least 1

-------

Modify resource amount in mineral field: add one
subtract 1 death of X
Add 1 death of y
preserve
THEN:

Condition:
Switching 'Determin....' is set
Deaths exactly 0 of X

-------

Clear 'determine...'
Set 'Binary Cutoff'
THEN:

Binary CUtoff is set
Deaths at least 512 of Y

-------

Subtract 512 of Y
add 512 to X
etc..

Hope u understand, I helped u with ur turn-based system before ;P
[right][snapback]621969[/snapback][/right]


That is perfect almost, would let player decide if they desired to see how much damage they did or not plus its pretty easy. (Beats 10000 triggers lol)

What was the first problem I had? I forgot pinch.gif
Report, edit, etc...Posted by Koltz on 2007-02-01 at 22:12:12
It was on maplantis, where u needed a way to check player 'agility' levels in turn-based combat
Report, edit, etc...Posted by Oo.l3ahamut.oO on 2007-02-01 at 22:22:21
QUOTE(Koltz @ Feb 1 2007, 10:12 PM)
It was on maplantis, where u needed a way to check player 'agility' levels in turn-based combat
[right][snapback]621980[/snapback][/right]


ah yeah, I remember it was on maplantis but the agility seems so obvious now that I forgot about not knowing how to detect it lol
Report, edit, etc...Posted by Koltz on 2007-02-01 at 22:23:32
This will become obvious too as u get better
Report, edit, etc...Posted by Oo.l3ahamut.oO on 2007-02-01 at 22:27:29
QUOTE(Koltz @ Feb 1 2007, 10:23 PM)
This will become obvious too as u get better
[right][snapback]621993[/snapback][/right]


I am not sure this is going to work however... The Modify Resource trigger doesnt allow the ability to add/subtract minerals only set to. And the Set Resource Amount has to deal with gathered resources so idk =/
Report, edit, etc...Posted by PCFredZ on 2007-02-01 at 22:28:30
Modify Resource is changing the amount of resources in a mineral patch or vespene geyser. The trigger action you SHOULD be using is Set Resources.
Report, edit, etc...Posted by Oo.l3ahamut.oO on 2007-02-01 at 22:31:03
QUOTE(PCFredZ @ Feb 1 2007, 10:28 PM)
Modify Resource is changing the amount of resources in a mineral patch or vespene geyser. The trigger action you SHOULD be using is Set Resources.
[right][snapback]622001[/snapback][/right]


If you notice koltz's first post this is for setting minerals in a patch not the players current minerals, set resources cant do this to my knowledge.
Report, edit, etc...Posted by Koltz on 2007-02-01 at 22:32:28
U can always use Text trigger dupe to duplicate 9999 triggers xD
Report, edit, etc...Posted by Oo.l3ahamut.oO on 2007-02-01 at 22:41:57
QUOTE(Koltz @ Feb 1 2007, 10:32 PM)
U can always use Text trigger dupe to duplicate 9999 triggers xD
[right][snapback]622006[/snapback][/right]


I am not sure how devlisks works exactly and MA's lacks the ability to put a variable in the display text being as you must enter in a string.

On second thought I can still use the modify with MA's although not with as few triggers as I had hoped. This map is going to be 1mb in triggers I think lol. Just determining Str took 4k triggers = about 370kb so with 9999 triggers easily 1mb not including all the other triggers c_c this will definately be 1 of the biggest maps starcraft will see im guess at least 20-25k triggers, at least..
Report, edit, etc...Posted by Koltz on 2007-02-01 at 22:44:04
I can show u how to work devilesks trig dupe, its a lot easier, Less buggy AND u can modify text strings in it
Report, edit, etc...Posted by Oo.l3ahamut.oO on 2007-02-01 at 22:54:04
QUOTE(Koltz @ Feb 1 2007, 10:44 PM)
I can show u how to work devilesks trig dupe, its a lot easier, Less buggy AND u can modify text strings in it
[right][snapback]622015[/snapback][/right]


that would be great, seeing as from what I can tell devilesks can use more than 1 variable c_c. MA's techniqually can but you cant set a range for the extended variables so they are basically void.
Report, edit, etc...Posted by Koltz on 2007-02-01 at 23:03:42
user posted image

I might have gotten the 0 and VRB mixed in the action, one of them is supposed to be 'mineral patch'


Anyways, WHen the switch is set, and the Y value is reached, it sets the mineral patch to exactly what the Y value is
Report, edit, etc...Posted by Oo.l3ahamut.oO on 2007-02-01 at 23:20:22
QUOTE(Koltz @ Feb 1 2007, 11:03 PM)
user posted image

I might have gotten the 0 and VRB mixed in the action, one of them is supposed to be 'mineral patch'
Anyways, WHen the switch is set, and the Y value is reached, it sets the mineral patch to exactly what the Y value is
[right][snapback]622028[/snapback][/right]


I see whats going on but what is the unit # for a mineral patch? I have an incomplete list of unit #s that doesnt include mineral patchs only the post mined chunks which dont help
Report, edit, etc...Posted by Koltz on 2007-02-01 at 23:22:06
When u do the original trigger in SCMDraft itll give it to u
Report, edit, etc...Posted by Oo.l3ahamut.oO on 2007-02-01 at 23:25:10
QUOTE(Koltz @ Feb 1 2007, 11:22 PM)
When u do the original trigger in SCMDraft itll give it to u
[right][snapback]622043[/snapback][/right]


and 1 last question cant I just use "X" in place of VRB?
Report, edit, etc...Posted by Koltz on 2007-02-01 at 23:35:15
U can use anything you want
Report, edit, etc...Posted by JaFF on 2007-02-02 at 07:24:34
I have another solution for your problem. You will need 10 strings: '0', '1', '2'... '9'. Instead of displaying all 999999 possible damage values horizontally, you can do it vertically - one number per line.

I will not post the actualytriggers, I'll just tell you the general idea.

Your damage is held in one deathcounter - A. You need two more deathcounters - B and C.

First, copy the value from A to B by using C. I hope you know how to use binary countoffs. After it is done, we have thias situation: A=B=damage, C=0.

Then, you count the number of 10[sup]6[/sup] in your counter B, and record the value to C. So if your damage is 654321, you set C to 6. Display C in one line. Set C to 0. Then, you count the number of 10[sup]5[/sup] and put the result into C. Display in a line. Set C to 0. And so on...

After this process, B is set to 0, and C is set to 0 by the last check.
Report, edit, etc...Posted by spinesheath on 2007-02-02 at 14:37:55
JaFF, he already said he doesn't like the vertical display.

Anyways, the rectangle that has units arranged in the shape of numbers works very well.
I once made a calculator with an 8-digit minimap display that way, and I did all the triggers by hand. It does not take 10000 triggers for 4 digits...

Basically, what you do is:
x is the DC.

if x > 8999
then x - 9000; display "9" as the fourth digit

if x > 7999
then x - 8000; display "8" as the fourth digit

and so on. After x > 999 comes x > 899, of course. Takes 10 * number of digits triggers. 40 in this case. Pay attention to trigger order.
Report, edit, etc...Posted by Friut on 2007-02-02 at 16:57:09
QUOTE(Koltz @ Feb 1 2007, 09:02 PM)
Modify resource amount in mineral field: add one
[right][snapback]621969[/snapback][/right]


How come i cant do that blink.gif
Next Page (1)