Jump to content

Recommended Posts

Hello Guys, I have made a button to change sky box, when someone click on that button, it should change the sky boxes but it doesn't work, so can anyone please check what's wrong with that code

Thanks in advance ❤️❤️ 

	def ClickSky(self):
		if constInfo.Night == 0:
			background.RegisterEnvironmentData(1, constInfo.ENVIRONMENT_NIGHT)
			background.SetEnvironmentData(1)
			constInfo.Night = 1
		elif constInfo.Night == 2:
			background.RegisterEnvironmentData(2, constInfo.ENVIRONMENT_Skybox4)
			background.SetEnvironmentData(2)
			constInfo.Night = 2			
		elif constInfo.Night == 3:
			background.RegisterEnvironmentData(3, constInfo.ENVIRONMENT_Skybox3)
			background.SetEnvironmentData(3)
			constInfo.Night = 3
		elif constInfo.Night == 4:
			background.RegisterEnvironmentData(4, constInfo.ENVIRONMENT_Skybox2)
			background.SetEnvironmentData(4)
			constInfo.Night = 4
		elif constInfo.Night == 0:
			background.RegisterEnvironmentData(0, constInfo.ENVIRONMENT_Skybox1)
			background.SetEnvironmentData(0)
			constInfo.Night = 0
		else:
			background.SetEnvironmentData(0)
			constInfo.Night = 0
		snd.PlaySound('sound/ui/pick.wav')

 

Edited by Ahmed
Link to comment
https://metin2.dev/topic/23539-sky-box-button-problem/
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.