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

Timer titel change

Status
Not open for further replies.
Level 7
Joined
Jun 15, 2010
Messages
218
How do i change the titel of a timer window for just 1 player?



[very different question sorry] is it possible to make units unselectable or even better that u cant give any orders to it (exept with triggers)
 
Level 12
Joined
Jan 30, 2009
Messages
1,067
I don't know how to do the first one, but the second one is easy enough.

You can give the unit the Locust ability. That makes them unselectable by the player, meaning that in order to give them orders, you would need to use triggers. However, that makes them unselectable to EVERYTHING. Attacks, etc., so keep this in mind.
 
Level 14
Joined
Nov 18, 2007
Messages
1,084
1) This would need GetLocalPlayer.
  • -------- This example will change a title window to something else only for Player 1 --------
  • Custom script: if GetLocalPlayer() == Player(0) then
  • -------- In Jass, the player numbering is different as it uses 0-11 instead of 1-12 like GUI and the editor. --------
  • -------- So Player(0) in Jass would be Player 1 (Red), Player(1) would be Player 2 (Blue), etc. --------
  • Countdown Timer - Change the title of (Last created timer window) to Another Title
  • Custom script: else
  • Countdown Timer - Change the title of (Last created timer window) to Default Title for Other Players
  • Custom script: endif
If you want to know more about GetLocalPlayer, you can learn about it here.
 
Level 12
Joined
Jan 30, 2009
Messages
1,067
I knew it would need GetLocalPlayer, just not how to do it. >.>

But I believe that there should take care of your questions, I hope, :)
 
Level 7
Joined
Jun 15, 2010
Messages
218
Unit - Order (Triggering unit) to Attack-Move To (Center of Rekt[2])

It doesent work anymore after i gave him locotus
 
Level 29
Joined
Mar 10, 2009
Messages
5,016
1. you cant change the title for a particular player coz a timer is for ALL, however
you can make it MPI by creating separate timers for players...

  • Countdown Timer - Hide (Last created timer window) for Player 1 (Red)
Unit - Order (Triggering unit) to Attack-Move To (Center of Rekt[2])

It doesent work anymore after i gave him locotus

I dont think so, maybe your trigger is wrong...
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Are you sure Locust unit can't attack ?
Maybe you disabled its attack index or something ?
I tried to locust a unit, once
And enable its attack index and so on
He still can attack other, but other unit can't attack it, that's the only way around
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Here's a system that causes you not to be able to order your units.

Units get a point where they are ordered to attack when they spawn. If you order them to do something, the order you gave them will be overridden with an attack-move commad to their original destination.

Every 5 seconds a footman spawns. Try to order him around. Pressing ESC will order a random footman to attack-move to another location.


http://www.hiveworkshop.com/forums/pastebin.php?id=7n5yvo
 
Level 6
Joined
Sep 5, 2007
Messages
264
@Chasin225: The reason that your unit can't be ordered when you've given it the "Locust" ability, is because "Locust" cancels all incoming orders (making the unit behave on it's own) however, if you temporarily remove "Locust", and order your unit to do what you want, then replace the "Locust" ability... it works! Well, until it finishes the order you give it, then it resorts to it's own line of thinking. So you have to either give it an order that takes a while to complete (like an "attack-move" from one side of the map to the other) or you have to use timers to refresh its orders.
 
Status
Not open for further replies.
Top