Announcement

Collapse
No announcement yet.

NPC: change appearance

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Voltaism
    replied
    (npc a little giant...) It's because you do :
    {1.3,1.3,1.3} for the body size

    Leave a comment:


  • Nounours
    replied
    it seems to work
    Click image for larger version

Name:	Image1.jpg
Views:	159
Size:	22.3 KB
ID:	2427
    (npc a little giant...)

    Thanks a lot









    Leave a comment:


  • Voltaism
    replied
    Are there any presets ? (other than https://dev.playonset.com/wiki/ClothingPresets) No
    Do that (untested) :
    Code:
    AddEvent("OnPackageStart", function()
    LicensesNpc = CreateNPC(LicensesNpcLocation.x, LicensesNpcLocation.y, LicensesNpcLocation.z, LicensesNpcLocation.h)
    local CustomClothesTable = {
    body = {"/Game/CharacterModels/SkeletalMesh/BodyMerged/HZN_CH3D_Normal06_LPR",{1.3,1.3,1.3},false,false,{ "/Game/CharacterModels/Materials/HZN_Materials/M_HZN_Body_NoShoesLegsTorso",0}},
    clothing0 = {"/Game/CharacterModels/SkeletalMesh/HZN_CH3D_Hair_Scientist_LP"},
    clothing1 = {"/Game/CharacterModels/SkeletalMesh/Outfits/HZN_Outfit_Piece_FormalShirt_LPR"},
    clothing2 = {"/Game/CharacterModels/SkeletalMesh/Outfits/HZN_Outfit_Piece_FormalPants_LPR"},
    clothing3 = {"/Game/CharacterModels/SkeletalMesh/Outfits/HZN_Outfit_Piece_BusinessShoes_LPR"},
    clothing4 = false,
    clothing5 = false,
    clothing6 = false,
    clothing7 = false,
    clothing8 = false,
    clothing9 = false
    }
    SetNPCNetworkedCustomClothes(LicensesNpc, CustomClothesTable)
    CreateText3D(_("license_shop").."\n".._("press_e") , 12, LicensesNpcLocation.x, LicensesNpcLocation.y, LicensesNpcLocation.z + 120, 0, 0, 0)
    end)

    Leave a comment:


  • Nounours
    replied
    Now I would like to create a female NPC.

    Are there any presets ? (other than https://dev.playonset.com/wiki/ClothingPresets)

    Using "SetNPCNetworkedCustomClothes (npc, Custom Clothes Table)" does not work :
    example of script :
    "
    AddEvent("OnPackageStart", function()
    LicensesNpc = CreateNPC(LicensesNpcLocation.x, LicensesNpcLocation.y, LicensesNpcLocation.z, LicensesNpcLocation.h)
    GetNPCPropertyValue(LicensesNpc, "NetworkedClothes")
    table.insert(CustomClothesTable, {
    body = {"/Game/CharacterModels/SkeletalMesh/BodyMerged/HZN_CH3D_Normal06_LPR",{1.3,1.3,1.3},false,false,{ "/Game/CharacterModels/Materials/HZN_Materials/M_HZN_Body_NoShoesLegsTorso",0}},
    clothing0 = {"/Game/CharacterModels/SkeletalMesh/HZN_CH3D_Hair_Scientist_LP"},
    clothing1 = {"/Game/CharacterModels/SkeletalMesh/Outfits/HZN_Outfit_Piece_FormalShirt_LPR"},
    clothing2 = {"/Game/CharacterModels/SkeletalMesh/Outfits/HZN_Outfit_Piece_FormalPants_LPR"},
    clothing3 = {"/Game/CharacterModels/SkeletalMesh/Outfits/HZN_Outfit_Piece_BusinessShoes_LPR"},
    clothing4 = false,
    clothing5 = false,
    clothing6 = false,
    clothing7 = false,
    clothing8 = false,
    clothing9 = false
    })
    SetNPCNetworkedCustomClothes(LicensesNpc,CustomClo thesTable)

    CreateText3D(_("license_shop").."\n".._("press_e") , 12, LicensesNpcLocation.x, LicensesNpcLocation.y, LicensesNpcLocation.z + 120, 0, 0, 0)
    end)
    "


    Leave a comment:


  • Nounours
    replied
    Originally posted by Voltaism View Post
    You can't set a NPCClothingPreset serverside.
    If you want to do this, you can use : https://github.com/vugi99/onset-networked-clothes
    Thanks a lot.
    It is good.

    Leave a comment:


  • Voltaism
    replied
    You can't set a NPCClothingPreset serverside.
    If you want to do this, you can use : https://github.com/vugi99/onset-networked-clothes

    Leave a comment:


  • Nounours
    started a topic NPC: change appearance

    NPC: change appearance

    Hello. I cannot change the appearance of NPCs (sellers, ...).
    Everything else is working fine.
    CreateNPC is presented in two different syntaxes and SetNPCClothingPreset gives me the following error:
    Error in MariaDB callback: [string "onsetrp / shops / server.lua"]: 74: attempt to call a nil value (global 'SetNPCClothingPreset')

    Here are the two examples from the dev wiki i try :



Working...
X