• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Random Hint[text to all players]

Status
Not open for further replies.
Level 1
Joined
Jun 5, 2008
Messages
151
Hi, can someone tell me how to post random hint to all players every 60 seconds for 30 seconds ;) You dont have to make me full trigger but just tell me some hints or something ;d
 
  • Trigger
  • Events
    • Map Initialization
  • Conditions
  • Actions
    • Set Hint[1] = Press Alt to display stuff
    • Set Hint[2] = Run, when taking damage, for Christ's sake!
    • Set Hint[3] = Respect the environment, don't use Firebolt!
  • Trigger1
  • Events
    • Time - Every 60.00 seconds of game-time
  • Conditions
  • Actions
    • Game - Display to (All players) for 30.00 seconds the text: Hint[(Random integer number from 1 to 3])
 
Level 1
Joined
Jun 5, 2008
Messages
151
Thanks alot =] i give REP to you ^_^


I cant give REP -.- I must spread some REP somewhere....I did it and I still cant
 
Level 2
Joined
Mar 7, 2010
Messages
9
Tip: Do not use "Map Initilization".
This event can only be used ONCE in a map.

Why?
Simple. This event will be the first to trigger, if you have 2 of these events, one/more of the triggers wont trigger.

How can this be solved?
Use Time event and set it to "Eplased time equal to 0.00".
 
Yes, but you can set the time to 0.01 for the next trigger, 0.02 etc etc... :)
Don't bother. Map Initialization triggers, I've heard, should all be merged. Personally, I merged all of my like-event triggers into one (one death trigger, one ability effect trigger, one unit gains level trigger, etc.).

The game does not crash/ignore triggers if you use the same event twice.

If you notice a lag, it's most likely because you're trying to do a lot of things in the same instant.
 
Level 1
Joined
Jun 5, 2008
Messages
151
Super_Man I dont see his messages here -.- anyway I know how to make hints already ;D I found it in a map "The New World" 4.0 [unprotected] they allow you to change and use triggers ;D
 
Level 9
Joined
Nov 28, 2008
Messages
704
  • Trigger
  • Events
    • Map Initialization
  • Conditions
  • Actions
    • Set Hint[1] = Press Alt to display stuff
    • Set Hint[2] = Run, when taking damage, for Christ's sake!
    • Set Hint[3] = Respect the environment, don't use Firebolt!
  • Trigger1
  • Events
    • Time - Every 60.00 seconds of game-time
  • Conditions
  • Actions
    • Game - Display to (All players) for 30.00 seconds the text: Hint[(Random integer number from 1 to 3])

Arrays start at [0]. Im begging you, never start from 1 again. D:
 
Level 9
Joined
Nov 28, 2008
Messages
704
The programming significance is that an array is merely a pointer to the start of your things. To get an individual element, it timeses the index you give it by the size of one element. Thus, if you have an integer, which uses (I think?) 4 bytes in WC3, to get the first element, index 0:

(place of pointer) + 0 * 4

index 1:

(place of pointer) + 1 * 4

And so on. That is why they start at 0, not 1. If they started at 1, the pointer would actually refer to a place (size of thing) units backwards. Which means when you try to get the address of something, you have to add or subtract and then everything turns into a mess.

But mostly OCD. Still, people seem to use 1 because they think things should start at 1 and that bothers me because they dont appear to know the math behind how an array works.
 
Status
Not open for further replies.
Top