antstubell Posted March 27, 2020 Author Share Posted March 27, 2020 Thanks. I'm an idiot because all I had to do was change the float properties to int properties to avoid all this,My next issue is confusing, it should be so straightforward, When a used fuse is placed it is assigned a random number between 0 and 2. Then assigned a value depending on the random result. But what I am getting is that no matter what the random number is it always triggers the same condition, not the one it is supposed to. I'll link a video in which I will only place blue fuses that have a value of 20. The already installed blue fuse cannot be removed as this gives the player a clue to its value, so the total value should be 60%, 3 x blue fuses + the random value of the used fuse.https://onedrive.live.com/?auth=1&cid=B60C11D037429D8E&id=B60C11D037429D8E%2152292&parId=B60C11D037429D8E%21191&o=OneUp Function WhichUFuse()debug.notification("Used Fuse Check.")Int iRand = Utility.RandomInt(0, 2)RndNum.SetValue(iRand as Int)If RndNum.GetValue() == 0 && (My_GVfuseColorSlot1.GetValue() == 4)Slot1Value = 0debug.notification("Slot 1 Fuse Is A Dud.")EndIfIf RndNum.GetValue() == 1 && (My_GVfuseColorSlot1.GetValue() == 4)Slot1Value = 10debug.notification("Used Fuse Value 10.")EndIfIf RndNum.GetValue() == 2 && (My_GVfuseColorSlot1.GetValue() == 4)Slot1Value = 12debug.notification("Used Fuse Value 12.")EndIfdebug.notification("Random = " + iRand + " Used Fuse Value = " + Slot1Value); next 2 lines are from a different part of the script but added here so you can see the mathFuseValueTotal = Slot1Value + Slot2Value + Slot3Value + PreInstallFuseValueDebug.Messagebox("Power ="+ FuseValueTotal + "%")EndFunction Link to comment Share on other sites More sharing options...
IsharaMeradin Posted March 27, 2020 Share Posted March 27, 2020 All I can guess is that the check for (My_GVfuseColorSlot1.GetValue() == 4) is failing and a default zero value for Slot1Value is being carried through. Reason I suspect this is that non of those notification statements showed up in the video. Link to comment Share on other sites More sharing options...
Recommended Posts