Перейти к контенту

Худ ТЧ: Смена рук при смене костюма


Starter

Рекомендуемые сообщения

Privet. 

I've tried to port this mod onto OGSR engine. I added new callbacks in bind_stalker, and also used code by I am dead.
But hands doesnt change...

What i did wrong?

 

Я пытался портировать этот мод на движок OGSR. Я добавил новые обратные вызовы в bind_stalker, и я также использовал код, потому что я мертв.
Но руки не меняются ...

Что я сделал не так?

-----------------------------------------------------------------------------------------------------------------------------------
-- Схема смены рук при смене костюма
-- Автор: Kondr48 (Вампир35).
-- Последнее редактирование: 25.02.2016 12:00
-- За метод замены текстуры спасибо Alpet'у
-----------------------------------------------------------------------------------------------------------------------------------

function update() -- тут у нас вызывается смена текстуры.
  if last_outfit == nil then last_outfit = "hello" end
  if db.actor:item_in_slot(6) == nil then
   outfit = "sviter"
  else
   outfit = db.actor:item_in_slot(6):section()
  end
   if last_outfit ~= outfit then
   
    perchatka = system_ini():r_string(outfit,"texture_hands")
    exo = system_ini():r_string(outfit,"texture_exo")

    
    local t = texture_find("act\\act_arm_0")            --За место "act\\act_arm_sleve" вписать перчатку которую нужно заменять,у меня это "act\\act_arm_sleve"
    if t and t["hands\\act_arm_0"] then                        --За место  t["act\\act_arm_sleve"] вписать перчатку которую нужно заменять,у меня это t["act\\act_arm_sleve"]
     t["hands\\act_arm_0"]:load("hands\\"..perchatka) --Текстура которой заменятся "act\\act_arm_sleve" (название текстуры берется из секции костюма
    end
    local t_b = texture_find("act\\act_arm_0_bump")
    if t_b and t_b["hands\\act_arm_0_bump"] then
     t_b["hands\\act_arm_0_bump"]:load("hands\\"..perchatka.."_bump")
    end
    
    local te = texture_find("hands\\act_arm_exo")
    if te and te["hands\\act_arm_exo"] then
     te["hands\\act_arm_exo"]:load("hands\\"..exo)
    end
    local te_b = texture_find("hands\\act_arm_exo_bump")
     if te_b and te_b["hands\\act_arm_exo_bump"] then
     te_b["hands\\act_arm_exo_bump"]:load("hands\\"..exo.."_bump")
    end
    last_outfit = outfit  
  end
end

 

Поделиться этим сообщением


Ссылка на сообщение
  • Недавно просматривали   0 пользователей

    Ни один зарегистрированный пользователь не просматривает эту страницу.

AMK-Team.ru

×
×
  • Создать...