Can't change the values of character outfit with script...

  • #1, by AkcayKaraazmakSaturday, 20. June 2015, 16:54 5 years ago
    Hi mates, I want to change the values of 3d character's outfit within the code but it doesnt work. My code is below;
    I execure the script on "At beginning of the scene"

    local outfit = Characters.Main_char_3d_2.CharacterCurrentOutfit

    outfit.OutfitCameraAngle = 120
    outfit.OutfitCameraHeight = 1
    outfit.OutfitModelScaleFactor = 150

    Nothing happens. My version is 4.2


    Cheers smile

    Great Poster

    437 Posts


  • #2, by afrlmeSaturday, 20. June 2015, 17:53 5 years ago
    The first 2 fields according to the data structure are float values not integer. As for the rest I've no clue as I've still had no reason to mess around with 3D characters.

    Is there anything in the log file?

    Imperator

    6809 Posts

  • #3, by AkcayKaraazmakSaturday, 20. June 2015, 18:04 5 years ago
    Hi mate,

    I fixed it. I gave the name of the outfit instead of giving the name of the character. But I couldnt figure out how to change the LightColor.

    The format for the OutfitLightColor in outfit tab is like 153,153,142 cause its RGB. But how I can assign the values to outfit.OutfitLightColor

    For example;

    outfit.OutfitLightColor= 100,50,150 -- This doesnt work. When I write like this it just takes the first integer value which is 100. :\ But I want to assign all 3 RGB values to change the color.

    Great Poster

    437 Posts

  • #4, by afrlmeSaturday, 20. June 2015, 19:19 5 years ago
    It says integer, so I'm assuming something like 255.

    Is this any good? http://www.shodor.org/stella2java/rgbint.html

    I would have though it would have been a table personally, but I'm not sure based on the field type.

    Imperator

    6809 Posts

  • #5, by AkcayKaraazmakSaturday, 20. June 2015, 23:08 5 years ago
    Hey thank you so much Lee !!! That page is great. You saved my day again bro smile

    Great Poster

    437 Posts

  • #6, by afrlmeSunday, 21. June 2015, 00:04 5 years ago
    No problem. So the values the page generated were correct?

    Imperator

    6809 Posts

  • #7, by AkcayKaraazmakSunday, 21. June 2015, 00:09 5 years ago
    Yes Lee! grin This thing is great.

    Great Poster

    437 Posts

Write post