I am curently working on a big mod for crafting. Is it possible to start a dialogue when the player is activating a furniture (to start a dialogue when the player activates the forge, for example)
Tx in advance.
Scriptname css_tanning_script extends ObjectReference import utilityimport fron_utility_functions message property css_craftingtanning_base automessage property css_tanning_LeatherStrips automessage property css_peltandhidesintoleather automiscobject Property leather01 automiscobject Property badleather automiscobject Property LeatherStrips autoglobalvariable property css_tanning_skill autoEvent OnActivate(ObjectReference triggerRef)string sSkillLevel = Fron_GetSkillLevelName(css_tanning_skill.getvalueint())debug.notification("you are "+ sSkillLevel + " in tanning.")string sResultint xp_gained_4int myState = 1 while myState > 0int ibutton = css_craftingtanning_base.Show() if iButton == 0 myState = 0 int ibuttonleatherstrips = css_tanning_LeatherStrips.Show() ;craft leather strips from bad leather or from normal leather if ibuttonleatherstrips == 0 ;craft leather strips from bad leather myState = 0 sResult = css_check_success(5,12,20,css_tanning_skill,-4) debug.notification(sResult) game.getPlayer().RemoveItem(badleather) if sResult == "echec critique" xp_gained_4 = XP_gain(sResult,3,6,2,4,1,3,0,1) Improve_skill_from_experience(css_tanning_skill,xp_gained_4) elseif sResult == "echec" xp_gained_4 = XP_gain(sResult,3,6,2,4,1,3,0,1) Improve_skill_from_experience(css_tanning_skill,xp_gained_4) elseif sResult == "reussite" xp_gained_4 = XP_gain(sResult,3,6,2,4,1,3,0,1) Improve_skill_from_experience(css_tanning_skill,xp_gained_4) game.getPlayer().addItem(LeatherStrips,1) elseif sResult == "reussite critique" xp_gained_4 = XP_gain(sResult,3,6,2,4,1,3,0,1) Improve_skill_from_experience(css_tanning_skill,xp_gained_4) int critsucc_badLeather_number = utility.randomint(1,3) game.getPlayer().addItem(LeatherStrips,critsucc_badLeather_number) endif elseif ibuttonleatherstrips == 1 ;craft leather strips from normal leather myState = 0 sResult = css_check_success(5,12,20,css_tanning_skill,-4) debug.notification(sResult) game.getPlayer().RemoveItem(leather01) if sResult == "echec critique" xp_gained_4 = XP_gain(sResult,3,6,2,4,1,3,0,1) Improve_skill_from_experience(css_tanning_skill,xp_gained_4) elseif sResult == "echec" xp_gained_4 = XP_gain(sResult,3,6,2,4,1,3,0,1) Improve_skill_from_experience(css_tanning_skill,xp_gained_4) game.getPlayer().addItem(LeatherStrips,1) elseif sResult == "reussite" xp_gained_4 = XP_gain(sResult,3,6,2,4,1,3,0,1) Improve_skill_from_experience(css_tanning_skill,xp_gained_4) int succ_Leather_number = utility.randomint(2,4) game.getPlayer().addItem(LeatherStrips,succ_Leather_number) elseif sResult == "reussite critique" xp_gained_4 = XP_gain(sResult,3,6,2,4,1,3,0,1) Improve_skill_from_experience(css_tanning_skill,xp_gained_4) int critsucc_badLeather_number = utility.randomint(3,6) game.getPlayer().addItem(LeatherStrips,critsucc_badLeather_number) endif elseif ibuttonleatherstrips == 2 ;exit rack myState = 0 endif elseif iButton == 1 myState = 0 int ibuttonleatherfromhides = css_peltandhidesintoleather.Show() ;craft leather from animal hides 1 endifendWhileEndEvent