Code that acts in different ways for no diferent reason?

wroachbarrettewroachbarrette Member Posts: 101
edited November -1 in Working with GS (Mac)
Alright this thread is just something ive found odd and wanted to discuss because its honestly mind boggling I have now had several accounts of code that has acted randomly different on test runs compared to how it should act and this has happened twice in the same app hears the first instance, i have an actor that is suppose to hit another actor then once it bumps the actor it is suppose to stop moving. Now for some reason on different occasions this will just now work it will go to hit the actor miss then the actor will just spin there in place now thats just weird but it has happend on another occasion with code for a keypad sometimes it will work properly allowing three numbers to be punched in and others after the game has been reset i mind you it will just not work why is this?

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    for the actor thats spinning on collosion, check fixed rotation in its physics attributes to stop that
  • wroachbarrettewroachbarrette Member Posts: 101
    Well i have it set to rotate to a cretin position then stop and sometimes it does that and others the actor hits it and it just spins in place because i also have a constrain attribute on it
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    You can check fixed rotation like i said and then interpolate the rotation to whatever you want on collosion. It will still rotate with interpolate, it just wont rotate based purely on collosion. Try that and check back
  • wroachbarrettewroachbarrette Member Posts: 101
    never thought of that, ill have to look into that, but it wasant triggered by a collision as i said before and i apologize for that i accidentally edited the prototype in the sean to be on a timer then move and for some reason that still happened but i shall make those modifications then get back to you on the results
  • wroachbarrettewroachbarrette Member Posts: 101
    An update upon making the changed you suggested the code works! thanks now then if i could have assistance with the adjustment of some of my keypad code you would be of SO much help to me
  • wroachbarrettewroachbarrette Member Posts: 101
    But to ask the question, why was it that fifty precent of the time the actor would rotate and stop and fifty precent of the time it would spin randomly in place?
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    glad it helped.

    Not sure if im understanding correct about the second problem.

    you made like a keyboard you mean? and whats happening its not showing the digits you press?
  • wroachbarrettewroachbarrette Member Posts: 101
    Well the code is i admit hectic, i needed a system to enter in tempo, so i said then when the first key was pressed it should display say the digit 1 then say a 2 was pressed it was to add the two values together but multiply the 1 by 10, then the third number was say an 8, it was tp multiply the to by 10 and the 1 by 10 so the 1 would now be a 100 the two would be a 20 and the 8 would be an 8 added together and plugged into a timer the tempo would now be 128 but there is an issue with the code where sometimes all the numbers will work as they should then on others it wil instead of changing the first number by multiplying it by ten it changes itself to the first number as if the code just wasant there and im not using any prototypes but instead the same method used in the keyboard demo in which an integer attribute represents the number instead of a text attribute id be happy to upload it as a demo for inspection if ud like i also have been working on getting the tempo to change as it is using a timer and as you know timers wont change there set rate unless the seen is say reset.
Sign In or Register to comment.