Problema : [PY]Sistem HP

Înainte de a posta o problemă, caută în acest forum și poate găsești rezolvare.
Avatar utilizator
Petrinel
Nivel 4

Nivel 4
Mesaje: 539
Membru din: 31 Mar 2018, 00:58
Server: Fara
Regat: Jinno
Aprecieri: 319  
Mulţumiri: 101  
Discord: Copiază ID
Medalii

47gNss scrie: ↑12 Ian 2021, 21:31
Petrinel scrie: ↑12 Ian 2021, 21:26
47gNss scrie: ↑12 Ian 2021, 21:24

daca nu merge cea de la kazu incearca iar
https://filebin.net/c7ccos0e5n9g76pv
- acum imi arata asa :(
incearca iar pe acelasi link te rog.
Imagine
Afișează semnătura
Avatar utilizator
47gNss
Nivel 1

Nivel 1
Mesaje: 79
Membru din: 28 Sep 2020, 14:38
Server: Roth2
Regat: Chunjo
Aprecieri: 303  
Mulţumiri: 116  
Discord: Copiază ID
Medalii

Petrinel scrie: ↑12 Ian 2021, 21:45
47gNss scrie: ↑12 Ian 2021, 21:31
Petrinel scrie: ↑12 Ian 2021, 21:26

daca nu merge cea de la kazu incearca iar
https://filebin.net/c7ccos0e5n9g76pv
- acum imi arata asa :(
incearca iar pe acelasi link te rog.
m-a bagat in client imediat testez sistemul <3
Avatar utilizator
47gNss
Nivel 1

Nivel 1
Mesaje: 79
Membru din: 28 Sep 2020, 14:38
Server: Roth2
Regat: Chunjo
Aprecieri: 303  
Mulţumiri: 116  
Discord: Copiază ID
Medalii

Petrinel scrie: ↑12 Ian 2021, 21:45
47gNss scrie: ↑12 Ian 2021, 21:31
Petrinel scrie: ↑12 Ian 2021, 21:26

daca nu merge cea de la kazu incearca iar
https://filebin.net/c7ccos0e5n9g76pv
- acum imi arata asa :(
incearca iar pe acelasi link te rog.
0112 21:49:37149 :: TypeError
0112 21:49:37149 :: :
0112 21:49:37149 :: unbound method SetParent() must be called with DynamicGauge instance as first argument (got TargetBoard instance instead)
0112 21:49:37149 ::
Avatar utilizator
Petrinel
Nivel 4

Nivel 4
Mesaje: 539
Membru din: 31 Mar 2018, 00:58
Server: Fara
Regat: Jinno
Aprecieri: 319  
Mulţumiri: 101  
Discord: Copiază ID
Medalii

Acu da si uitarget.py
Imagine
Afișează semnătura
Avatar utilizator
47gNss
Nivel 1

Nivel 1
Mesaje: 79
Membru din: 28 Sep 2020, 14:38
Server: Roth2
Regat: Chunjo
Aprecieri: 303  
Mulţumiri: 116  
Discord: Copiază ID
Medalii

Petrinel scrie: ↑12 Ian 2021, 21:53 Acu da si uitarget.py
https://www.gfile.ro/?do=fD&fI=5be8128d ... 6f95908011
Avatar utilizator
Petrinel
Nivel 4

Nivel 4
Mesaje: 539
Membru din: 31 Mar 2018, 00:58
Server: Fara
Regat: Jinno
Aprecieri: 319  
Mulţumiri: 101  
Discord: Copiază ID
Medalii

47gNss scrie: ↑12 Ian 2021, 22:18
Petrinel scrie: ↑12 Ian 2021, 21:53 Acu da si uitarget.py
https://www.gfile.ro/?do=fD&fI=5be8128d ... 6f95908011
verifica acelasi link , te rog.
Imagine
Afișează semnătura
Avatar utilizator
47gNss
Nivel 1

Nivel 1
Mesaje: 79
Membru din: 28 Sep 2020, 14:38
Server: Roth2
Regat: Chunjo
Aprecieri: 303  
Mulţumiri: 116  
Discord: Copiază ID
Medalii

Petrinel scrie: ↑12 Ian 2021, 22:21
47gNss scrie: ↑12 Ian 2021, 22:18
Petrinel scrie: ↑12 Ian 2021, 21:53 Acu da si uitarget.py
https://www.gfile.ro/?do=fD&fI=5be8128d ... 6f95908011
verifica acelasi link , te rog.
imediat
Avatar utilizator
47gNss
Nivel 1

Nivel 1
Mesaje: 79
Membru din: 28 Sep 2020, 14:38
Server: Roth2
Regat: Chunjo
Aprecieri: 303  
Mulţumiri: 116  
Discord: Copiază ID
Medalii

47gNss scrie: ↑12 Ian 2021, 22:24
Petrinel scrie: ↑12 Ian 2021, 22:21
verifica acelasi link , te rog.
imediat
Tot la fel
Avatar utilizator
IrinaLoghin
Utilizator interzis !

Utilizator interzis !
Mesaje: 16
Membru din: 12 Ian 2021, 22:51
Server: NuFolosesc
Regat: Chunjo
Aprecieri: 6  
Mulţumiri: 6  
Medalii

Poftim:

Cod: Selectaţi tot

class DynamicGauge(Gauge):
	dynamicGaugePerc =  None
	newGaugePerc =  0
	def  __init__ ( self ):
		Gauge. __init__ ( self )
	def  __del__ ( self ):
		Gauge. __del__ ( self )
 
	def MakeGauge( self , width, color1, color2):
		Gauge.MakeGauge ( self , width, color2)
 
		imgGauge2 = ExpandedImageBox ()
		imgGauge2.SetParent(self)
		imgGauge2.LoadImage ("d:/ymir work/ui/pattern/gauge_"+color1+ ".tga")
		imgGauge2.Show ()
		imgGauge2.SetRenderingRect(0.0,0.0,0.0,0.0)
		imgGauge2.SetPosition (self.GAUGE_TEMPORARY_PLACE, 0 )
 
		self.imgGauge2 = imgGauge2
 
	def SetPercentage( self , curValue, maxValue):
		# PERCENTAGE_MAX_VALUE_ZERO_DIVISION_ERROR
		if maxValue > 0.0 :
			percentage = min ( 1.0 , float (curValue) / float (maxValue))
		else :
			percentage =  0.0
		# END_OF_PERCENTAGE_MAX_VALUE_ZERO_DIVISION_ERROR
		gaugeSize =  - 1.0  + float ( self.width -  self.GAUGE_TEMPORARY_PLACE * 2 ) * percentage / self.GAUGE_WIDTH
 
		if self.dynamicGaugePerc == None :
			self.imgGauge.SetRenderingRect (0.0,0.0,(-1.0 + float ( self.width - self.GAUGE_TEMPORARY_PLACE * 2 ) * percentage / self.GAUGE_WIDTH), 0.0 )
			self.dynamicGaugePerc = percentage
		elif self.dynamicGaugePerc + 0.2 < self.newGaugePerc:
			self.imgGauge.SetRenderingRect (0.0,0.0,( -1.0 + float ( self.width - self.GAUGE_TEMPORARY_PLACE * 2 ) * self.newGaugePerc / self.GAUGE_WIDTH), 0.0 )
			self.dynamicGaugePerc =  self.newGaugePerc
 
		self.newGaugePerc = percentage
		self.imgGauge2.SetRenderingRect ( 0.0 , 0.0 , gaugeSize, 0.0 )
		if percentage ==  0 :
			self.imgGauge.Hide ()
		else :
			self.imgGauge.Show ()
 
	def OnUpdate(self):
		if self.dynamicGaugePerc >  self.newGaugePerc:
			self.dynamicGaugePerc =  self.dynamicGaugePerc -  0.005
			self.imgGauge.SetRenderingRect ( 0.0 , 0.0 , ( - 1.0  + float ( self.width -  self.GAUGE_TEMPORARY_PLACE * 2 ) *  self.dynamicGaugePerc / self.GAUGE_WIDTH), 0.0 )
		elif self.dynamicGaugePerc < self.newGaugePerc:
			self.dynamicGaugePerc =  self.newGaugePerc
			self.imgGauge.SetRenderingRect ( 0.0 , 0.0 , ( - 1.0  + float ( self.width -  self.GAUGE_TEMPORARY_PLACE * 2 ) *  self.dynamicGaugePerc / self.GAUGE_WIDTH), 0.0 )
Enjoy it !
Avatar utilizator
47gNss
Nivel 1

Nivel 1
Mesaje: 79
Membru din: 28 Sep 2020, 14:38
Server: Roth2
Regat: Chunjo
Aprecieri: 303  
Mulţumiri: 116  
Discord: Copiază ID
Medalii

IrinaLoghin scrie: ↑12 Ian 2021, 23:02 Poftim:

Cod: Selectaţi tot

class DynamicGauge(Gauge):
	dynamicGaugePerc =  None
	newGaugePerc =  0
	def  __init__ ( self ):
		Gauge. __init__ ( self )
	def  __del__ ( self ):
		Gauge. __del__ ( self )
 
	def MakeGauge( self , width, color1, color2):
		Gauge.MakeGauge ( self , width, color2)
 
		imgGauge2 = ExpandedImageBox ()
		imgGauge2.SetParent(self)
		imgGauge2.LoadImage ("d:/ymir work/ui/pattern/gauge_"+color1+ ".tga")
		imgGauge2.Show ()
		imgGauge2.SetRenderingRect(0.0,0.0,0.0,0.0)
		imgGauge2.SetPosition (self.GAUGE_TEMPORARY_PLACE, 0 )
 
		self.imgGauge2 = imgGauge2
 
	def SetPercentage( self , curValue, maxValue):
		# PERCENTAGE_MAX_VALUE_ZERO_DIVISION_ERROR
		if maxValue > 0.0 :
			percentage = min ( 1.0 , float (curValue) / float (maxValue))
		else :
			percentage =  0.0
		# END_OF_PERCENTAGE_MAX_VALUE_ZERO_DIVISION_ERROR
		gaugeSize =  - 1.0  + float ( self.width -  self.GAUGE_TEMPORARY_PLACE * 2 ) * percentage / self.GAUGE_WIDTH
 
		if self.dynamicGaugePerc == None :
			self.imgGauge.SetRenderingRect (0.0,0.0,(-1.0 + float ( self.width - self.GAUGE_TEMPORARY_PLACE * 2 ) * percentage / self.GAUGE_WIDTH), 0.0 )
			self.dynamicGaugePerc = percentage
		elif self.dynamicGaugePerc + 0.2 < self.newGaugePerc:
			self.imgGauge.SetRenderingRect (0.0,0.0,( -1.0 + float ( self.width - self.GAUGE_TEMPORARY_PLACE * 2 ) * self.newGaugePerc / self.GAUGE_WIDTH), 0.0 )
			self.dynamicGaugePerc =  self.newGaugePerc
 
		self.newGaugePerc = percentage
		self.imgGauge2.SetRenderingRect ( 0.0 , 0.0 , gaugeSize, 0.0 )
		if percentage ==  0 :
			self.imgGauge.Hide ()
		else :
			self.imgGauge.Show ()
 
	def OnUpdate(self):
		if self.dynamicGaugePerc >  self.newGaugePerc:
			self.dynamicGaugePerc =  self.dynamicGaugePerc -  0.005
			self.imgGauge.SetRenderingRect ( 0.0 , 0.0 , ( - 1.0  + float ( self.width -  self.GAUGE_TEMPORARY_PLACE * 2 ) *  self.dynamicGaugePerc / self.GAUGE_WIDTH), 0.0 )
		elif self.dynamicGaugePerc < self.newGaugePerc:
			self.dynamicGaugePerc =  self.newGaugePerc
			self.imgGauge.SetRenderingRect ( 0.0 , 0.0 , ( - 1.0  + float ( self.width -  self.GAUGE_TEMPORARY_PLACE * 2 ) *  self.dynamicGaugePerc / self.GAUGE_WIDTH), 0.0 )
Enjoy it !
din uitarget.py e problema
Închis

Înapoi la “Probleme rezolvate”

  • Informaţie
  • Cine este conectat

    Utilizatori ce ce navighează pe acest forum: Google [Bot] și 230 vizitatori