HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

a usefull tip: set custom number directly in object editor

05-03-2006, 08:45 AM#1
illlusion
Of course we can use "set custom value" in trigger editor. but it has limitations(only availble for certern objects) and sometimes it's not convenient to handle in complex structure of system. at these circumsetance, it will be more easy to deal with if we can set a custom number directly in object editor and distinguish the object in trigger editor.

The way is: add this "|c00000000|r" at the front of the name of object. because this color-code contains nothing, it will display nothing and interfer nothing in the game. But the eight positions in "00000000" could be used freely to set to any number we want. then by easily setting numbers we could build a system,for example an item system,nearly as complex as we want.(you can add more "|c00000000|r" to a name if it's still not enouph to use.but i seriously suspect that any one can use up one.)

someone may say:we can already use the "point value" or "flying height",etc to do this. But these feilds only availble in unit, not in item or research. Any object always has a name, so the color-code-method is universal.

here is a demo to illustrate this ideal. in the demo map, we can choose multi heros by using only one trigger without variables ossociated with them.
Attached Files
File type: w3xselect hero.w3x (18.8 KB)
05-03-2006, 09:20 AM#2
PipeDream
Not a bad hack. For small bits of data, it's certainly an improvement over http://www.wc3jass.com/viewtopic.php?t=2461 and http://www.wc3jass.com/viewtopic.php?t=2469.
05-03-2006, 09:41 AM#3
iNfraNe
Is getname + substring faster than returnbug + GC call?
05-03-2006, 01:27 PM#4
Chuckle_Brother
Who knows, I guess this would be a good time to do a test. Any ideas of a suitable test we could do?

Biggest problem with this is that it only works for hardcoded values that you want your object to contain, but I suppose in the case of hero selection systems, fancy death systems(that spawn ghosts) or other similar things it could be very useful. Probably for fancy item pack systems.

Good idea with this.
05-03-2006, 10:15 PM#5
PitzerMike
Yes, i like the idea. Thanks for posting it.