• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

A few simple triggers

Status
Not open for further replies.
Level 4
Joined
Oct 31, 2010
Messages
34
Hi I need help with these triggers it would be AWESOME. I need all of these triggers done its very simple. Please dont post 1000 answers on just 1 question. Give me a gui example please

1. I need help i want to be able to see the mins played by players so when a player types -time it tells them the minutes they have played

2. I need help i want to make a trigger vote so that if a player types a mode they have a vote either to do it or not give me an example of a vote please gui only no jass and make sure the vote would most likely work for most modes
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
http://www.hiveworkshop.com/forums/world-editor-help-zone-98/elapsed-game-timer-205516/

and

  • Untitled Trigger 030
    • Events
      • Player - Player 1 (Red) types a chat message containing -time as An exact match
    • Conditions
    • Actions
      • Set pgrp = (Player group((Triggering player)))
      • Game - Display to pgrp the text: asda
      • Custom script: call DestroyForce(udg_pgrp)
pgrp is a player group variable.
When you display the text message, use concatenate strings and convert the time variables (integers) into strings. Conversion - convert integer to string.
 
Level 3
Joined
Dec 30, 2011
Messages
54
  • Init
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • -------- Player 1 (Red) --------
      • Set hours[0] = 0
      • Set minutes[0] = 0
      • Set seconds[0] = 0
      • -------- Player 2 (Blue) --------
      • Set hours[1] = 0
      • Set minutes[1] = 0
      • Set seconds[1] = 0
  • Time
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 2, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • seconds[(Integer A)] Less than 60
            • Then - Actions
              • Set seconds[(Integer A)] = (seconds[(Integer A)] + 1)
            • Else - Actions
              • Set seconds[(Integer A)] = 0
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • minutes[(Integer A)] Less than 60
                • Then - Actions
                  • Set minutes[(Integer A)] = (minutes[(Integer A)] + 1)
                • Else - Actions
                  • Set minutes[(Integer A)] = 0
                  • Set hours[(Integer A)] = (hours[(Integer A)] + 1)
  • Check Time
    • Events
      • Player - Player 1 (Red) types a chat message containing -time as An exact match
      • Player - Player 2 (Blue) types a chat message containing -time as An exact match
    • Conditions
    • Actions
      • Set player[(Player number of (Triggering player))] = (Triggering player)
      • Custom script: call DisplayTextToPlayer( udg_player[GetConvertedPlayerId(GetTriggerPlayer())] , 0 , 0, I2S(udg_seconds[GetConvertedPlayerId(GetTriggerPlayer())]) )
      • Custom script: call DisplayTextToPlayer( udg_player[GetConvertedPlayerId(GetTriggerPlayer())] , 0 , 0, I2S(udg_minutes[GetConvertedPlayerId(GetTriggerPlayer())]) )
      • Custom script: call DisplayTextToPlayer( udg_player[GetConvertedPlayerId(GetTriggerPlayer())] , 0 , 0, I2S(udg_hours[GetConvertedPlayerId(GetTriggerPlayer())]) )
This is an example for 2 players
 
Status
Not open for further replies.
Top