License from €75 Log in
DE EN FR ES IT CZ

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

This thread is a few years old. Some details may refer to an earlier version of Visionaire Studio. Current tutorials

  1. · 12 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
  2. Working on a game?

    The free version covers up to 25 scenes per project. For more scenes and to sell your game, you need a license.

    See licenses Try it for free
  3. · 12 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?
  4. · 12 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.
  5. · 12 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.
  6. · 12 years ago
    Hey thank you so much Lee !!! That page is great. You saved my day again bro smile
  7. · 12 years ago
    No problem. So the values the page generated were correct?
  8. · 12 years ago
    Yes Lee! grin This thing is great.

This thread is closed because nobody has replied for more than a year. Feel free to ask your question in a new thread.

New thread

Really delete this post?