Help me get out of this state!

Post » Tue Jun 23, 2015 3:53 am

I need help getting out of myState by finishing this function.

Basically, I have 3 detectors sending out data at certain thresholds, when one of those transmitters stop, the "function"(its not a function xD) below gets called. My only problem is, I have no idea how to determine what Int that should go in the EquipBasic() function.

My big problem is that I have 5 different endings, and i can't figure out what to do, to find the correct int. The Values from this array does not line up with values on the Equipment index, because this array can be customized. The LowStatCall() had an int variable included because it was the easiest way, but I can't do that on my out (I think).

What I think, this might be wrong, I need, is a way to either cross reference the arrays or find something I can include in my LowStatCall() to make it simple and easy to get out again.

Spoiler
Function LowStatEnd(String Main, String SecStat01, String SecStat02, MagicEffect SecStat01MGEF, magicEffect SecStat02MGEF, Bool Tocheck)int MainInt =  priorityListCurrent.Find(MAIN) int SecStat01Int = Prioritylistcurrent.Find(SecStat01) int SecStat02Int = PriorityListCurrent.Find(SecStat02) int OnCombatInt = PriorityListCurrent.Find("OnCombat") Int LeaveCombatInt = PriorityListCurrent.Find("LeaveCombat") String Zero = PriorityListCurrent[0]if toCheck == true		If MainInt == 4			if SecStat01Int > SecStat02Int				if !p.HasMagicEffect(SecStat02MGEF)					;EquipBasic() 			elseif SecStat01Int < SecStat02Int				if !p.HasMagicEffect(SecStat01MGEF)					;EquipBasic()			endif			elseif MainInt == 3		endifendifendifendifendfunction

Thanks!

User avatar
Robert Devlin
 
Posts: 3521
Joined: Mon Jul 23, 2007 2:19 pm

Post » Tue Jun 23, 2015 4:17 am

Well I dropped the idea cause I was stuck for so long, but now I am stuck pushing in conditions

Spoiler
	if HH < SS && HH < MM ;		EquipBasic(3)	elseif HH < SS && HH > MM ;		EqupBasic(5)	elseif HH > SS && HH < MM ; 		EquipBasic(4)	elseif HH > SS && HH > MM ;		if ss > MM			EquipBasic(5)		elseif MM > SS					EquipBasic(4)		endif

Is there any faster way to do this?

User avatar
Sarah Knight
 
Posts: 3416
Joined: Mon Jun 19, 2006 5:02 am

Post » Tue Jun 23, 2015 1:03 pm

if ( HH < SS )

if ( HH < MM )

; do stuff

elseif ( HH > SS )

; do stuff

endif

elseif ( HH > SS )

if ( HH < MM )

; do stuff

elseif ( HH > SS )

if ( SS > MM )

; do stuff

elseif ( SS < MM )

; do stuff

endif

endif

endif

if you REALLY mean to do NOTHING if ( HH == SS ) or ( HH == MM ) or ( SS == MM )

otherwise,

if ( HH < SS )

if ( HH < MM )

; do stuff

else

; do stuff

endif

else

if ( HH < MM )

; do stuff

else

if ( SS > MM )

; do stuff

else

; do stuff

endif

endif

endif

User avatar
SaVino GοΜ
 
Posts: 3360
Joined: Mon Sep 17, 2007 8:00 pm

Post » Tue Jun 23, 2015 11:50 am

Yes The values can never be equal to one another.

Thanks! That makes a lot more sense than what I am doing =D

User avatar
Jade Barnes-Mackey
 
Posts: 3418
Joined: Thu Jul 13, 2006 7:29 am

Post » Tue Jun 23, 2015 4:21 am

it's actually pretty much the same as yours, just with the variable checks stacked instead of all in a row

User avatar
Ashley Campos
 
Posts: 3415
Joined: Fri Sep 22, 2006 9:03 pm


Return to V - Skyrim