• 🏆 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!
dhguardianes
Reaction score
69

Profile posts Latest activity Postings Experience Media Resources About

  • there are examples in Network on how to do so : \

    I don't really have time to write up examples for you, I have a lot on my plate

    Why not try the World Editor Help Zone? There are a few people that have been working with the Network lib so far.

    I probably won't have time to do much for another 2 weeks.
    Just look up Ascii in JASS section. That'll allow you to convert the characters in the string to integers. From there, you can synchronize those integers and the convert them back into strings.
    So, you want the string to appear as "1" for Player(0), and "2" for everyone else?
    Or do you want the string to be equal to each player's player number? :p

    local string s = I2S(GetPlayerId(GetLocalPlayer()) + 1)
    ^Now, string s will be equal to the player number of each player :D
    (It will be "1" for Player(0), "2" for Player(1), "3" for Player(2), "4" for Player(3), etc...)

    But, this may cause a desync because of mismatches in the string table, so on map initialization, before you do this, execute this code:

    local integer i = 16
    loop
    call I2S(i)
    exitwhen i == 0
    set i = i - 1
    endloop

    ^The above code ensures that these strings are encountered first on all computers because if they are encountered in a different order on each computer, the string tables will be different, so the game will desync almost every time :/

    If this is not what you wanted, can you restate your question differently? :p
  • Loading…
  • Loading…
  • Loading…
  • Loading…
  • Loading…
  • Loading…
Top