HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

A couple of quick questions!!

01-28-2003, 07:08 PM#1
RodOfNOD
A couple of questions. Any way to get a date or time function/trigger?

When u write to the cache it only writes to player1s computer or does it write to all players?

Besides creating a custom character for everyone do you know how to NAME a non hero unit with a different name for everyone u make? ie I have a footman and the first I want to be called George, the second Ralph etc. Dont want to use heros and know I can make a separate custom one for each. Any other way? I want the name to show up when u click on him and when when u put your mouse over him.

I am having a real problem with the rand function. In some cases it works in others it doesnt. The simplest is I have a simple integer being generated randomly 1-44 but it generates the same random # every time i run the map? any idea?

Thanks. You people are great!8)
01-28-2003, 08:47 PM#2
Ari
With resepct to the random number troubles, using the "test map" function of WE *always* uses the same random number seed. So if you test a map, you'll always get the same sequence of random numbers. If you're not using "test map" then you're probably using cinematic mode before this. Cinematic mode also resets the random number seed. Avoid using it if you need randomness (you can simulate it by disabling unit contgrol, lowering volume, and turning on "box screen mode" (forgot the true name)).

With respect to unit names, I believe it isn't possible to do as you've described (though I could be wrong). The only way I can think of is the way you already know: multiple unit types that are the same, each with a different name ("bob" footmen, "joe" footmen, etc).

About getting the date and time - do you mean system time or game time? Game time is easy (it's a real function). As far as I know system time is impossible to access.
01-28-2003, 09:01 PM#3
RodOfNOD
Thank you ARI! I didnt know that thing about the random number, That helps. System time is what I want. There must be a way since you can have code. Someone must be able to write a function. My c++ days are done. Been almost 20 years since I played with that language and Im not about to try again!

So still need answer to the system time and date, and if possible the name answer... Thanks!
01-28-2003, 09:21 PM#4
rwxr-xr-x
I highly doubt that you can get the system time, but who knows, maybe there is a way even using JASS.

As for your names for Non Hero units, you will have to create a seperate unit for each name that you want. Heros have the Proper Names string list, but normal units are based on the Name field and cannot be changed in game.
01-30-2003, 08:37 AM#5
RodOfNOD
Thats what I had to do all 98 of them. Can you choose the heros name? I have been unable to do that if I have more than one it just randomly picks it! :(