• 🏆 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!

Changing Name

Status
Not open for further replies.
Level 5
Joined
Mar 25, 2008
Messages
150
How do i make a trigger that does: Player writes -name (the name he wants) Then change the name to (the name he wants)?

And how do i make a Timer Window that says income and that is periodic and that expires every 90 sec
Plz help then you will help my map evolve!
Will rep if the things u say works
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
That's quite easy, wait a sec

Done first one:
  • Untitled Trigger 001
    • Events
      • Player - Player 1 (Red) types a chat message containing -name as A substring
    • Conditions
      • (Substring((Entered chat string), 1, 5)) Equal to -name
    • Actions
      • Player - Set name of (Triggering player) to (Substring((Entered chat string), 6, (Length of (Entered chat string))))
Done Second:
It is actually 2 triggers:
  • Untitled Trigger 001
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Countdown Timer - Start RBB_CreepAttackTimer as a Repeating timer that will expire in 90.00 seconds
      • Set RBB_CreepAttackTimer = (Last started timer)
      • Countdown Timer - Create a timer window for RBB_CreepAttackTimer with title Income
      • Countdown Timer - Show (Last created timer window)
  • Untitled Trigger 001 Copy
    • Events
      • Time - RBB_CreepAttackTimer expires
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Player - Add 1000 to (Picked player) Current gold
 
Level 5
Joined
Mar 25, 2008
Messages
150
That's quite easy, wait a sec

Done first one:
  • Untitled Trigger 001
    • Events
      • Player - Player 1 (Red) types a chat message containing -name as A substring
    • Conditions
      • (Substring((Entered chat string), 1, 5)) Equal to -name
    • Actions
      • Player - Set name of (Triggering player) to (Substring((Entered chat string), 6, (Length of (Entered chat string))))
Done Second:
It is actually 2 triggers:
  • Untitled Trigger 001
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Countdown Timer - Start RBB_CreepAttackTimer as a Repeating timer that will expire in 90.00 seconds
      • Set RBB_CreepAttackTimer = (Last started timer)
      • Countdown Timer - Create a timer window for RBB_CreepAttackTimer with title Income
      • Countdown Timer - Show (Last created timer window)
  • Untitled Trigger 001 Copy
    • Events
      • Time - RBB_CreepAttackTimer expires
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Player - Add 1000 to (Picked player) Current gold

The last trigger is not needed becuz i did not ask for it^^ but thanks anyway and here is how i formulated my income trigger
  • Dwarf Income
    • Events
      • Time - Every 90.00 seconds of game time
    • Conditions
    • Actions
      • Player - Add 30 to (Owner of Dwarven Castle 0004 <gen>) Current gold
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
Hehe, oh, i thought you wanted a timer screen ^^,,
Well, That one makes a timer window, and gives Income at the Exact moment that it expires,,
But, i am glad i could've helped ^^

BTW: Do you get the thing about Substrings?
 
Level 5
Joined
Mar 25, 2008
Messages
150
OH you think i did not need the whole next trigger^^ yes i needed a timer screen^^ but not the income trigger. And yes i think so ^^, but as you may allready see i'm not expert with triggers and stuff but i got most of the basics. And for anyone that reads this post i'm looking for a scripter/trigger person that can help/make triggers and that would like to ''help'' me or join me in my project
 
Status
Not open for further replies.
Top