Jump to content

Why sometimes it works but sometimes it don't? :c...


blank_v

Recommended Posts

Posted

I'm already fking tired of that useless fking shit...

for last 2 hours im trying to fix that fk%(#@* 

 

bfffffffff

 

ok... I have script... this script should resize object reference to given scale...

 

but... sometimes it work and sometimes it dont...

more like in 90% cases its not working and in 10% it is...

 

i was trying many things but im out of ideas...

Image:

Spoiler

72850_20200910183225_1.png.e85025c585afa03cb5e1928b07e32eb7.png

 

Script:

Spoiler

Scriptname QLG_Script_Gathering_HugeOre extends ObjectReference  
{ Script for Huge Rocks with ores placed on Map }
;===- Base Info. -===;
 ;Created: 2020-09-10
 ;Update: 2020-09-10
 ;Author: TobiPL
 ;Unit: M.PC<1>
;===- Var. setup -===========================================;
	;==- Core -==;
	KeyWord Property QKey Auto
	MiscObject Property MyRock Auto	; Ohh yee Rust :D
	FormList Property OreList Auto
	FormList Property GemList Auto
	;==- Skill -==;
	Float Property BaseXp Auto
	;[0] - Coal
	;[1] - Iron
	;[2] - Silver
	;[3] - Gold
	;==- Personal -==;
	int Life			; if reach -1 or less transform rock to ore
	Int GemID 			; Special reference for special loot :D gems :3...
	ObjectReference Ore	; spawn reference
;===============================================;
;===- Main Script -=============================;
;***********************************************;
Event OnInit()
	Life = Utility.RandomInt( 25 , 70 )
	Int Amt = GemList.GetSize()
	Amt -= 1
	GemID = Utility.RandomInt( 0 , Amt )
	GoToState("Ready")
EndEvent
;===============================================;
State Ready
	Event OnHit( ObjectReference QAgr, Form QSrc, Projectile Pr, bool a, bool b, bool c, bool d)
		If( QAgr == Game.GetPlayer() )
			If( QSrc.HasKeyword( QKey ) == true )
				If( Life >= 0 )
					Life -= Utility.RandomInt( 3 , 6 )
					Ore = ( self as ObjectReference ).PlaceAtMe( MyRock , 1 )
					Ore.ApplyHavokImpulse( Utility.RandomFloat( -1.0 , 1.0 ) , Utility.RandomFloat( -1.0 , 1.0 ) , Utility.RandomFloat( -1.0 , 1.0 ) , 12.0 )
						If( Utility.RandomInt( 0 , 7 ) == 1 )
							Ore = ( self as ObjectReference ).PlaceAtMe( GemList.GetAt( GemID ) , 1 )
							Ore.ApplyHavokImpulse( Utility.RandomFloat( -1.0 , 1.0 ) , Utility.RandomFloat( -1.0 , 1.0 ) , Utility.RandomFloat( -1.0 , 1.0 ) , 5.0 )
						EndIf
					Return
				EndIf
				GoToState("Done")
				Int Amount = Utility.RandomInt( 2 , 5 )
				Game.AdvanceSkill( "Marksman", BaseXp )
				While( Amount >= 0 )
					Ore = ( self as ObjectReference ).PlaceAtMe( OreList.GetAt( 1 ), 1 )
					Ore.ApplyHavokImpulse( Utility.RandomFloat( -1.0 , 1.0 ) , Utility.RandomFloat( -1.0 , 1.0 ) , Utility.RandomFloat( -1.0 , 1.0 ) , 12.0 )
					Ore.SetScale( 1.9 )
					Amount -= 1
				EndWhile
				self.Disable( true )
				self.Delete()
			EndIf
		EndIf
	EndEvent
EndState
;===============================================;
State Done
	; Do nothing...
EndState
; The End

 

 

Any1 can help ? :c...

 

ofc. i'm gonna improve this script even more :D

+ Perks 

+ Sounds

+ maybe some dust effects etc.

 

but i don't want to move to other things while this fking setscale is not working :/.............................

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...