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

Host Detection

Status
Not open for further replies.
Level 12
Joined
May 30, 2009
Messages
829
Jesus man, read the tutorial.

The player (Host) is automatically detected at map initialization, and then you can use that player for various purposes.

You can also have the function called again if the host leaves, since if the game is still going, there must be a player who can host, and that player will be detected.
 
Level 13
Joined
Mar 4, 2009
Messages
1,156
in the picture it says

Variable Type: Player (Player)

how did he do that (the orange part) ?

BTW:
i open my trigger editor

click on icon that has NameOfMyMap.w3x

i paste jass code down

Custom Script Code:
-JASS CODE

than i create this trigger

  • Untitled Trigger 001
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Custom script: Custom script: call GetHost()
i can enable/disable trigger but when i start the map test it fails

does it maybe fails because i don't know how to do Variable Type: Player (Player)?

and i did do this variable

Variable Name: "Host"
Variable Type: Player
 
Level 15
Joined
Aug 11, 2009
Messages
1,606
Level 17
Joined
Jun 12, 2007
Messages
1,261
Status
Not open for further replies.
Top