1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. The Lich King demands your service! We've reached the 19th edition of the Icon Contest. Come along and make some chilling servants for the one true king.
    Dismiss Notice
  4. The 4th SFX Contest has started. Be sure to participate and have a fun factor in it.
    Dismiss Notice
  5. The poll for the 21st Terraining Contest is LIVE. Be sure to check out the entries and vote for one.
    Dismiss Notice
  6. The results are out! Check them out.
    Dismiss Notice
  7. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  8. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  9. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

[Trigger] Setting a sky for one player

Discussion in 'Triggers & Scripts' started by DEFACKTwalker, Sep 10, 2012.

  1. DEFACKTwalker

    DEFACKTwalker

    Joined:
    Aug 2, 2008
    Messages:
    130
    Resources:
    5
    Skins:
    2
    Maps:
    2
    Template:
    1
    Resources:
    5
    Setting a sky / skybox for one player

    Hello everyone, i have one question!

    how do i set a sky / skybox for one player with 'GetLocalPlayer' and without desync?

    I've created a simple hero selection system with arrow keys for my map. If you press a key, the next hero will be shown as a preview with an unique sky.

    The trigger i am currently using cause desync for sure.

    Trigger
    • Set PlayerNumber = ((Player number of (Triggering player)) - 1)
    • Custom script: if(GetLocalPlayer() == Player(udg_PlayerNumber)) then
    • Environment - Set sky to 'some sky'
    • Custom script: endif


    someone told me this can be done with a text string? But i don't understand how and i didn't find a solution on the forums. Please help me =)
     
  2. Arhowk

    Arhowk

    Joined:
    Aug 8, 2007
    Messages:
    2,753
    Resources:
    0
    Resources:
    0
    Nope. The JASS function for that is

    native SetSkyModel takes string path returns nothing

    The GUI counterpart for this does that except it gives u a list of presets. If u want to use an exact string,

    Custom script: call SetSkyModel( "If This Path Is Invalid, The Game Will Desync" )
     
  3. DEFACKTwalker

    DEFACKTwalker

    Joined:
    Aug 2, 2008
    Messages:
    130
    Resources:
    5
    Skins:
    2
    Maps:
    2
    Template:
    1
    Resources:
    5
    Alright, so i use:

    • Custom script: call SetSkyModel( "environment\Sky\FelwoodSky\FelwoodSky.blp" )


    for a felwod sky?
     
  4. Arhowk

    Arhowk

    Joined:
    Aug 8, 2007
    Messages:
    2,753
    Resources:
    0
    Resources:
    0
    nope..


    Environment\\Sky\\FelwoodSky\\FelwoodSky.mdl

    first of all, it always must be double slashed.

    Also, capitalized letters count.

    Also, the sky is not a texture it is a model. if u attempt to set it to a .blp, the game will crash regardless if its in a local block or not
     
  5. DEFACKTwalker

    DEFACKTwalker

    Joined:
    Aug 2, 2008
    Messages:
    130
    Resources:
    5
    Skins:
    2
    Maps:
    2
    Template:
    1
    Resources:
    5
    Oh right... i just copyed a path from MPQ editor, never mind.
    it seems to work for one player, will try it on multiplayer!

    thanks for your fast answers Arhowk!