开发者

Psuedo Random numbers in WC3 Map Editor?

As I'm trying to write a random hero function in the WC3 Map Editor I've discovered that the built in GUI code for generating a Random number is not so random. Its a disgusting repeating Pseudo Random line. Every time the trigger is run it generates the same sequence of numbers no matter how many times the trigger is ran.

Is there a way to generate a more random looking set of numbers?

Actions
-Set randomInt[(Player number of (Owner of (Sold Unit)))] = (Random integer number between 1 and 10)
-开发者_如何学GoGame - Display to (All Players) the text: (String(randomInt[(Player number of (Owner of (Sold Unit)))]))

I have no problem with the Pseudo Random concept, but it doesn't generate a new line of Pseudo Random whenever the game starts. Now my real problem is that I'm deployed in Afghanistan and all of the WC3 Map Making communities are blocked. Does anyone know how to generate a more random sequence of numbers?


According to this thread:

That only happens when you play the map through the "test map" feature in the world editor. It will always generate the same variables, even if random. If you really want to test triggers with random variables/numbers, play the map normally by opening wc3 and selecting the map in-game.


there is a setting in the map editor for that, generate random by using same seed.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜