I had a script working in the previous version, now it's not

  • #1, by pietro-eccherSunday, 15. March 2020, 20:36 4 years ago
    The script comes from somewhere in this forum, or some tutorial and I can't remember if I modded it, but I am sure it was working before the last update: it should set my player size to 30 when a certain value is true.

    I can see that the function runs when my condition is set (by pressing TAB on VS player  - and it's registered in the main loop) but it seems to do nothing now:

    function chksize()
    
      local small = getObject("Conditions[mr_small]")
    
     
    
      if small:getBool(VConditionValue) == true then
    
        Characters["mr"].CharacterSize = 30
    
      end
    
    end
    
    
    
    registerEventHandler("mainLoop", "chksize")


    Do you spot anything wrong here?
    Thank you

    Newbie

    29 Posts


  • #2, by pietro-eccherSunday, 15. March 2020, 22:23 4 years ago


    UPDATE: if I print the value of Characters["mr"].CharacterSize inside my if statement as below, the logic "works": I have the print statement and the value is 30.0, so it appears that CharacterSize property is being ignored by VS.

    function chksize()
    
      local small = getObject("Conditions[mr_small]")
    
     
    
      if small:getBool(VConditionValue) == true then
    
        Characters["mr"].CharacterSize = 30
    
         print("small happens",  small:getBool(VConditionValue), Characters["mr"].CharacterSize )
    
      end
    
    end
    
    
    
    registerEventHandler("mainLoop", "chksize")

    Newbie

    29 Posts

  • #3, by pietro-eccherTuesday, 17. March 2020, 19:19 4 years ago
    May I download VS5 previous releases somewhere?
    Not RC because unfortunately these are not able to open my projects made with VS5.xx. Maybe I was using 5.08 but I am not sure about it, I didn't pay attention.
     
    I am pretty sure that this script should work, and I was relying on it for my game.

    It's ok to have bugs here and there, but it should be possible to use previous versions to check when these bugs generate.

    Thank you

    Newbie

    29 Posts

  • #4, by SimonSTuesday, 17. March 2020, 19:28 4 years ago
    I will fix it with the next update for Visionaire this week. If you want to go back, it's listed as 5.0 in the licenses section above.

    Thread Captain

    1580 Posts

  • #5, by pietro-eccherTuesday, 17. March 2020, 19:50 4 years ago
    Thank you Simon, I will wait then because I already made some additions with the new save format and the previous version is no longer able to open it roll
    I just checked: it was working in 5.09
    while as VS5.0 from the license section I get 5.0.10 - but in windows apps list it appears as 5.08  grin

    Thank you again


    Newbie

    29 Posts