- Joined
- Sep 21, 2007
- Messages
- 517
There is an idea that i have not tested yet... but as we all know: custom value can make something MUI, to the limit of 8192 units. Now iv just returned to mapmaking and realized that my custom value MUI way can be branched into making other MUI Arrays to satisfy more than one value, multiple MUI arrays for each and every unit by simply multiplying the custom value itself by a specified number after adjusting the custom value of the units in the map. (this way should be used for storing, indexing is to be used for spells)
This should look like this:
[for example over here i attached 2 strings to a ground unit which dies, one by normal custom value]
Now this information can be regained by simply using the custom value times the specified number itself:
Now this idea is really simple, yet it has so much potential... the only thing i dont know is the maximum number an array can store which would set the limits of this "system", unless of course there is a way to set reals in arrays indexes, which would be completely awesome
Hope it helped, and many additions would hopefully be made by our dear hive community xD
This should look like this:
-
Untitled Trigger 001
-
Events
-
Map initialization
-
-
Conditions
-
Actions
-
Set UnitMap = (Units in (Playable map area))
-
For each (Integer A) from 1 to (Number of units in UnitMap), do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Integer_ID Greater than or equal to 8192
-
-
Then - Actions
-
Else - Actions
-
Set Integer_ID = (Integer_ID + 1)
-
Unit - Set the custom value of (Picked unit) to Integer_ID
-
-
-
-
-
Custom script: call DestroyGroup(udg_UnitMap)
-
-
-
EXAMPLE
-
Events
-
Unit - A unit Dies
-
-
Conditions
-
((Triggering unit) is A ground unit) Equal to True
-
-
Actions
-
Set groundunit[(Custom value of (Triggering unit))] = (dead + (String(Integer_ID)))
-
Set groundunit[((Custom value of (Triggering unit)) x 2)] = (dead2 + (String((Integer_ID)))
-
Set customvalueofdeadunit = (Custom value of (Triggering unit))
-
Trigger - Run regainingValue <gen> (checking conditions)
-
-
[for example over here i attached 2 strings to a ground unit which dies, one by normal custom value]
Now this information can be regained by simply using the custom value times the specified number itself:
-
regainingValue
-
Events
-
Conditions
-
Actions
-
Game - Display to (All players) the text: groundunit[customvalueofdeadunit]
-
Game - Display to (All players) the text: groundunit[(customvalueofdeadunit x 2)]
-
-
Now this idea is really simple, yet it has so much potential... the only thing i dont know is the maximum number an array can store which would set the limits of this "system", unless of course there is a way to set reals in arrays indexes, which would be completely awesome
Hope it helped, and many additions would hopefully be made by our dear hive community xD