Login / Registrieren
DE EN FR ES IT CZ
Zurück Nach oben

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

  • #1, by AkcayKaraazmak 11 years ago Zitieren
    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, by afrlme 11 years ago Zitieren
    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?
  • #3, by AkcayKaraazmak 11 years ago Zitieren
    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.
  • #4, by afrlme 11 years ago Zitieren
    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.
  • #5, by AkcayKaraazmak 11 years ago Zitieren
    Hey thank you so much Lee !!! That page is great. You saved my day again bro smile
  • #6, by afrlme 11 years ago Zitieren
    No problem. So the values the page generated were correct?
  • #7, by AkcayKaraazmak 11 years ago Zitieren
    Yes Lee! grin This thing is great.