Can you use a leveled list in a summon creature script?

Post » Thu May 03, 2012 11:27 pm

I am working on a script to summon a sparring partner and was wondering if it's possible to use a leveled list/creature in the summon

Or am I going to have to do a nested set of ifelse statements?
User avatar
Michelle Serenity Boss
 
Posts: 3341
Joined: Tue Oct 17, 2006 10:49 am

Post » Fri May 04, 2012 6:36 am

if statements
User avatar
butterfly
 
Posts: 3467
Joined: Wed Aug 16, 2006 8:20 pm

Post » Fri May 04, 2012 1:05 am

was afraid of that... oh well
User avatar
Princess Johnson
 
Posts: 3435
Joined: Wed Feb 07, 2007 5:44 pm

Post » Fri May 04, 2012 8:39 am

was afraid of that... oh well
Why? it is not so difficult, and you have greater control, e.g.
begin spawn1Script; usage: startscript spawn1Scriptshort i1set i1 to Random 10001if ( i1 > 8000 )	PlaceAtPC "scrib diseased" 1 128 0elseif ( i1 > 6000 )	PlaceAtPC "guar_feral" 1 128 0elseif ( i1 > 4000 )	PlaceAtPC "rat_diseased" 1 128 0elseif ( i1 > 2000 )	PlaceAtPC "netch_bull" 1 128 0else	PlaceAtPC "kagouti_diseased" 1 128 0endifStopScript spawn1Scriptend
, or (equivalent, but using < test, from lesser to greater values)
begin spawn2Script; usage: startscript spawn2Scriptshort i1set i1 to Random 1001if ( i1 < 200 )	PlaceAtPC "scrib diseased" 1 128 0elseif ( i1 < 400 )	PlaceAtPC "guar_feral" 1 128 0elseif ( i1 < 600 )	PlaceAtPC "rat_diseased" 1 128 0elseif ( i1 < 800 )	PlaceAtPC "netch_bull" 1 128 0else	PlaceAtPC "kagouti_diseased" 1 128 0endifStopScript spawn2Scriptend
User avatar
Neko Jenny
 
Posts: 3409
Joined: Thu Jun 22, 2006 4:29 am

Post » Fri May 04, 2012 2:00 am

Wound up with a static mob, got better scaling to do. [static stats right now, but that is for later]

But was eaiser to use a passive mob and let the controller turn it hostile (and scripted in catches to prevent player death, as well as auto-respawning and healing code work)

And able to get it to work with a heal target longsword as well. So unlike a stationary mob, you can level armor skills with it

Begin MV_SH_TrainBotIf (GetAttacked == 1)	StartCombat PlayerEndifIf (OnDeath == 1)	Resurrect	StopCombat	Position 1430, 0, -300, 0	Face 762,0	EndifIf ( player->gethealth < 10 )	Stopcombat	Position 1430, 0, -300, 0	Face 762,0	Messagebox "Training ended due to master's low health"	Cast "MV_SH_DevHeal" Player  ;heal player 1000pts each Fatigue, Health, Magicka. Prevents loop	Cast "MV_SH_DevHealSelf" "MV_SH_Skeleton" ; Heals self as wellendif	End

controller
Begin MV_SH_TrainContrl	short button	short QuestionState	if ( menumode == 1 )		return	endif	if ( OnActivate == 0 )		if ( QuestionState == 0 )			Return		endif	endif	if ( QuestionState == 0 )		MessageBox "Would you like to use this device?" "Yes" "No"		set QuestionState to 10	endif		;Ask second question	if ( QuestionState == 10 )		Set button to GetButtonPressed		if ( button == 0 )			MessageBox "What function do you want to use?" "Begin Training" "End Training"			set QuestionState to 20		elseif ( button == 1 )			set QuestionState to 0		endif		Return	endif		;perform cure or give message	if ( QuestionState == 20 )		Set button to GetButtonPressed		if ( button == 0 )			MV_SH_Skeleton -> StartCombat Player			Set QuestionState to 0		endif		if ( button == 1 )			MV_SH_Skeleton -> StopCombat			MV_SH_skeleton -> Position 1430, 0, -300, 0			MV_SH_Skeleton -> Face 762,0			Cast "MV_SH_DevHeal" "MV_SH_Skeleton"  ; heals the skeleton back to full			Set QuestionState to 0		endif	endifend
User avatar
Carys
 
Posts: 3369
Joined: Wed Aug 23, 2006 11:15 pm


Return to III - Morrowind