blank_v Posted September 10, 2020 Posted September 10, 2020 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 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 + Perks + Sounds + maybe some dust effects etc. but i don't want to move to other things while this fking setscale is not working :/.............................
Recommended Posts
Archived
This topic is now archived and is closed to further replies.