Jump to content

[LE] What is wrong with my script ? :)


Recommended Posts

//Edit:

 

 

 

Argh :c...

 

can't change it now... cause im in Home now...

 

And in work im not sure i will have time for this xD

cause here in home i have acces only to World Textures and models :c...

 

im not sure it will work fine cause i never use Mod and dont even know what it is b4 you send me link to CK Wiki

but i will test it :x... or brb... ill try to get Scripts and other things on my PC in home :x...

 

 

can't w8 to start making Arena Spawning system xD

last script was insane long cause i write every wave by my hand

 

and i was using only PlaceAtMe cause i have no idea how to use Arrays and Loops in CK XD

so for eaxmple if Wave was spawning 20 Enemies

 

there was 20 line

 

XMarker_01.PlaceAtMe( Unit_13 ) ; or something like this xDDDD

XMarker_02.PlaceAtMe( Unit_13 )

XMarker_03...

XMarker_04...

...

...

XMarker_20.PlaceAtMe( Unit13 ) ;

 

if there is possible something like this:

for(int i=0;i<QEnemyToSpawn;i++)
XMarker[ Random(0, XMarkers) ].PlaceAtMe( EnemyUnit[ Random(0, EnemyUnits) ] );
it would help me very much xD
i know i can use While but how can i make Arrays? :x
but this lets left for other Topic :tongue:
thanks god we have something like CTRL + D and CTRL + I xD
//Edit:
y i know my Code is ugly and not perfect but to this time i was working only with Russians :tongue:
we was working together in 3 but they left me... Tivo and Wuestenranger join
but Tivo is doing almost nothing and Wuestenranger... well he close his ACC on Nexus for
while and now he is not answering xD lel
i just was teached by 2 russian ppl who love wodka so ye xD
but we made few nice and epic mods :x... lel
maybe scripts were stupid long and waste resources
maybe textures were made in Gimp without Mesh support xD
yes i was and im still making textures for 3D models without actually seeing this model :D
but after 500 textures im pretty good with this :tongue:

Final Final version:

Scriptname QLG_Script_DeleteDead extends Actor
;===- Base Info. -===;
 ;Created: 2019-03-09
 ;Update: 2019-03-12 ( TobiPL )
 ;Author: TobiPL
 ;Unit: M.PC<3>
;===- Var. setup -============================================


;===- Fame -===
	GlobalVariable property QFameStore auto
	{ Global, Fame that player have }
	
	int property QFameReward auto
	{ Fame that player earn for killing this enemy }
	
	
;===- Gold -===
	GlobalVariable property QArenaPayout auto
	{ Global, Gold that player should get after win }
	
	int property QGoldChance auto
	{ Chance to drop gold }
	
	int property QGoldReward auto
	{ Gold that player earn for killing this enemy }
	
	int property QGoldOff auto
	{ Gold offset for killing Monsters
		example:
		  Set =20= mean +/- 10 Gold
		  Set =60= mean +/- 30 Gold
		This value shouldn't be bigger than QGoldReward
	}
	

;===- Messages -===	
	bool property QIsBoss auto
	{ Only if Unit is Boss or Special }
	
	string property QKillMsg auto
	{ Text to show when player have killed this unit 
	  Text will show only if :QIsBoss: is set to True }





;===- Script -Main- -================================================
Event OnDeath(Actor QKiller)

	If ( QKiller == Game.GetPlayer() )
		If QIsBoss
			Debug.Notification( QKillMsg )
		EndIf
		
		If ( QGoldChance > Utility.RandomInt(0, 100) )
		
			int QPay = QGoldOff / 2
			QPay = Utility.RandomInt( -QPay, QPay ) + QGoldReward
			
			If ( QPay > 0 )
				QArenaPayout.Mod( QPay as int )
			EndIf
		EndIf
		
		QFameStore.Mod( QFameReward )
		
		Utility.Wait(30.0)		;wait for other mods/scripts
		self.disable()			;disable
		Utility.Wait(10.0)		;wait
		self.delete()			;delete
	EndIf
EndEvent


;===- Script -===-===- ;ReDragon2013 ( NexusForum )
Event OnCellDetach()
	
	self.Delete()            ;just in case (have to be verified)
	
EndEvent







 

 

Edited by TobiaszPL
Link to comment
Share on other sites

  • Recently Browsing   0 members

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