• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Randoming triggers and quests

Status
Not open for further replies.
Level 7
Joined
Dec 28, 2009
Messages
257
yo, its sort of spam but again, im working on my town siege map.
the question is. at start, you can choose 9heroes- so question is, how can i make trigger that random chooses her for me and computer, if i dont choose one until 60seconds?
also, about quests. how can i make quests? its all about triggers?
and, one last- how can i make window that counts kills of players and how much time i survived? (not time left, but time so far)

thanks for help.
 
Level 19
Joined
Feb 25, 2009
Messages
2,004
Save heroes in veriable, start timers for every player, when the timers ends (hits 0), run a trigger that creates 1 of the saved heroes. If you don't want to have same heroes, null the veriable when its chosen and use condition that checks if the selected veriable is not empty.

For counting elapsed time (survived time), I will recommend you to read my tutorial about this here.

Counting kills is easy, just make an array integer with name "Kills", create a trigger with event "Unit - Unit dies", check if the unit is owned by the attackers (or the player that owns the creeps that attacks the survivors), then set the veriable, and use the number of the player that owns the killing unit as a array number.
 
Level 4
Joined
Apr 14, 2009
Messages
118
Like Mortar- suggested...use the timers, but then you could assign each hero to an integer. At the end of the timer, the trigger randomly chooses an integer between 1 and 9, then you will be able to choose that hero.
 
Level 7
Joined
Dec 28, 2009
Messages
257
aj, got it! i wanted to make it somehow else, but still good.
now few triggers and its done!
about heroes- you can choose from heroes with wisp by coming into circle. after 60seconds you randomly gets hero, but i need to do it so if you choose hero you wont get another random.. but ill do that.
 
Last edited:
Level 4
Joined
Apr 14, 2009
Messages
118
So you used the timers and integers? for the Wisp part, just make it so

Game time is 5 seconds
Unit - Create 1 Wisp at the center of *region* for *player*
Trigger - Turn off this trigger
INSTEAD of doing *Unit- Create 1 Wisp......* you can make sure the player is in the game like this:

If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 1 (Red) slot status) Equal to Is playing
Then - Actions
Unit - Create 1 Wisp for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
Else - Actions
Do nothing


That way, if red is not there, a red wisp wont appear.

hope that helps :D
 
Level 7
Joined
Dec 28, 2009
Messages
257
hm, good idea... ill probably make it like: if player 2isnt playing, player 1,3 gains fontrol of theris units- or something like that.
youá can change diplomacies, so this shouldnt be problem!
but thanks anyway!
 
Status
Not open for further replies.
Top