Switching one-handed to two-handed script

Post » Sat Feb 19, 2011 6:32 am

scn aaaa1Z1BattleAxeShort buttonshort equipDelaybegin onEquip Player	MessageBox "Which fighting style would you like to use?", "Battleaxe", "Waraxe"	Set button to GetButtonPressed	ElseIf ( button == 0)	EquipItem vorpal1Z1battleaxe	endif	If ( button == 1 )	message " "	message " "	RemoveItem vorpal1Z1battleaxe 1	message " "	message " "	if ( equipDelay == 0 )	  additem vorpal1Z1waraxe 1	  set equipDelay to 1	elseif ( equipDelay < 10 )		set equipDelay to equipDelay + 1	elseif ( equipDelay > 0 )		message " "		message " "		equipItem vorpal1Z1waraxe 		set equipDelay to -1      endif	endifend


and

scn aaaa1Z1WarAxeShort buttonshort equipDelayshort doOncebegin onAdd	if doOnce == 0		activate aaaa1Z1CaveInTrapA  		byebyerock1.Disable		byebyerock2.Disable		aaaa1Z1cloud.Disable		set doOnce to 1	endifendbegin onEquip	MessageBox "Which fighting style would you like to use?", "Battleaxe", "Waraxe"	Set button to GetButtonPressed	If ( button == 0 )	message " "	message " "	RemoveItem vorpal1Z1waraxe 1	message " "	message " "	if ( equipDelay == 0 )	  additem vorpal1Z1battleaxe 1		set equipDelay to 1	elseif ( equipDelay < 10 )		set equipDelay to equipDelay + 1	elseif ( equipDelay > 0 )		message " "		message " "		equipItem vorpal1Z1battleaxe 		set equipDelay to -1 	endif	endif	ElseIf ( button == 1)	EquipItem vorpal1Z1waraxe	endifend


Any suggestions for why this doesn't work?
Many thanks.
User avatar
MatthewJontully
 
Posts: 3517
Joined: Thu Mar 08, 2007 9:33 am

Post » Sat Feb 19, 2011 8:21 am

The first ElseIf in the first script, and the last ElseIf in the second script, I assume are intended to be just IFs. Aside from that, I think removing an item with a script running on it terminates the script; and it looks like the alternate axe doesn't get added until after the first is removed, thus preventing it from getting added.
User avatar
Barbequtie
 
Posts: 3410
Joined: Mon Jun 19, 2006 11:34 pm


Return to IV - Oblivion