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

[Trigger] Setting a sky for one player

Status
Not open for further replies.
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.

  • 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 =)
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
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" )
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
Alright, so i use:

  • Custom script: call SetSkyModel( "environment\Sky\FelwoodSky\FelwoodSky.blp" )
for a felwod sky?

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
 
Status
Not open for further replies.
Top