• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

custom script for triggering player

Status
Not open for further replies.
Level 5
Joined
Jan 19, 2020
Messages
102
can someone add for triggering player to this custom script?


custom script call SetReservedLocalHeroButtons(0)

it moves hero icons together, but i dont like it for all players
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,217
Put it inside conditional blocks that test the value of GetLocalPlayer. GetLocalPlayer returns the value of the player for the local client so the value is unique for every client playing.

Of course you need to make sure running the actions locally does not cause the player to desync.
 
Level 5
Joined
Jan 19, 2020
Messages
102
i cant code jass, maybe just read it.
maybe someone write it into jass code with local Variable?

Events
Time - Elapsed game time is 1.00 seconds

Actions
For each (Integer A) from 1 to 4, do (Actions)
Loop - Actions
For each (Integer B) from 1 to 4, do (Actions)
Loop - Actions
Player - For (Player((Integer B))), turn Full shared units On toward (Player((Integer A)))
Player - For (Player((Integer B))), turn Shared units Off toward (Player((Integer A)))
Custom script: call SetReservedLocalHeroButtons(2)
Multiboard - Create a multiboard with 1 columns and 1 rows, titled DUMMY.
Multiboard - Show (Last created multiboard)
Multiboard - Hide (Last created multiboard)
Multiboard - Destroy (Last created multiboard)


here is a Trigger for hero icons and it works good.
 
Status
Not open for further replies.
Top