• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[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