Warcraft III resources & community, 2003–2006 · archived

Integer Help

5 posts
#1

Integer Help

I am having a hard time with integers -.-
They give me a headache.Can someone post some helping hints?Oh yeah.I tryed to make,for example,a info sistem on my map.But it didn't work and I know I did something right but I don't know what it is.I want it to show a random message from 20 to 20 seconds of the game.[/code]
#2

Re: Integer Help

Paul47I am having a hard time with integers -.-
They give me a headache.Can someone post some helping hints?Oh yeah.I tryed to make,for example,a info sistem on my map.But it didn't work and I know I did something right but I don't know what it is.I want it to show a random message from 20 to 20 seconds of the game.


How do you have problems with basic numbers?

And you know you did something right? I think you mean wrong.

You want to show a message from 20 seconds in the game to 20 seconds in (essentially 0 seconds)?

Why don't you post what you have so far?
#3
To create this info system you need a string type variable array 20. Lets name it "hints"

Then you create a trigger:

event - map iniziliation
conditions - none
actions:
-Set variable hints[1] = "Hello all!"
-Set variable hints[2] = "Hello again, did you miss me?"
-Set variable hints[3] = "Running out of things to say"
-Set variable hints[4] = "BURN IN HELL!....joking :)"
etc.

Do that for all the 20 tips.

Then create the trigger that displays your hints:

event - every 20 second of game time
condition - none
actions:
- Game text message: Display hints[random number between 1 and 20] for all players for 15 seconds.

Done! Have fun.
#4
The Integers consist of the positive natural numbers (1, 2, 3, …), their negatives (−1, −2, −3, ...) and the number zero. More formally, the integers are the only integral domain whose positive elements are well-ordered, and in which order is preserved by addition. Like the natural numbers, the integers form a countably infinite set. The set of all integers is usually denoted in mathematics by a boldface Z, which stands for Zahlen (German for "numbers").
#5
Is it really? I would have thought it would be denoted by an Eta (if thats the name for that funny E thing) Infinite Series :P