antstubell Posted June 3, 2019 Share Posted June 3, 2019 Having issues with this script. Objective is for player to light a fire. Player MUST have 3 firewood and either oil or a rag,Erros I am a recieving are...(11,25): required (...)+ loop did not match anything at input 'Auto'(11,29): mismatched input '\\r\\n' expecting STATE Thanks for any help. MiscObject Property FWood AutoMiscObject Property Oil AutoMiscObject Property Rag AutoMessage Property FireLit AutoMessage Property MoreWood AutoMessage Property Ragoil AutoMessage Property NoItem AutoMessage Property Greet AutoObjectReference MyMarker AutoEvent OnActivate(ObjectReference akActionRef)Greet.show()Int ItemA = Game.GetPlayer().GetItemCount(FWood)Int ItemB = Game.GetPlayer().GetItemCount(Oil)Int ItemC = Game.GetPlayer().GetItemCount(Rag)If ItemA >= 3 && ItemB >= 1FireLit.show()MyMarker.Enable()Game.GetPlayer().RemoveItem(ItemA, 3)Game.GetPlayer().RemoveItem(ItemB, 1); Player has 3 firewood 1 oil the fire will light items will be removedElseIf ItemA >= 3 && ItemC >= 1FireLit.show()MyMarker.Enable()Game.GetPlayer().RemoveItem(ItemA, 3)Game.GetPlayer().RemoveItem(ItemC, 1); Player has 3 firewood 1 rag the fire will light items will be removedElseIf ItemA < 3MoreWood.show(); Player has insufficient firewoodElseIf ItemA >= 3 && ItemB < 1 || ItemA >= 3 && ItemC < 1Ragoil.show(); Player has enough firewood but does not have any oil or ragsElseIf ItemA < 1 && ItemB < 1 && ItemC < 1NoItem.show(); Player has none of the required itemsEndIfEndEvent Link to comment Share on other sites More sharing options...
Reneer Posted June 3, 2019 Share Posted June 3, 2019 ObjectReference MyMarker Auto should be: ObjectReference Property MyMarker Auto Link to comment Share on other sites More sharing options...
c0ax599 Posted June 3, 2019 Share Posted June 3, 2019 Hawhaw.. I'm making a on/off fireplace too. I decided to do it without using any requirements. But, I'm using DarkFox127's tutorial on youtube. And using his scripts. Of course, his resources are missing the source for that script so i can't copy the source and make a new script like his tut suggests. :( I'm kinda like dead in the water there and totally bummed.. Any ideas, on where i can find a similar script? Or, god forbid make my own. I'm not quite that advanced yet... Link to comment Share on other sites More sharing options...
IsharaMeradin Posted June 3, 2019 Share Posted June 3, 2019 Hawhaw.. I'm making a on/off fireplace too. I decided to do it without using any requirements. But, I'm using DarkFox127's tutorial on youtube. And using his scripts. Of course, his resources are missing the source for that script so i can't copy the source and make a new script like his tut suggests. :sad: I'm kinda like dead in the water there and totally bummed.. Any ideas, on where i can find a similar script? Or, god forbid make my own. I'm not quite that advanced yet...No idea if this will help you. I made a resource mod for original Skyrim that demonstrated a campfire going through various stages of burning (Campfire Stages). Someone else created a text tutorial to go along with it. It may be more complicated than what you desire. But it may give you some ideas. That said, you can use Champollion to decompile PEX files into a readable and re-compile-able format (but it does not appear the same as the original PSC file). This may at least get you past the hurdle with DarkFox127's tutorial. Link to comment Share on other sites More sharing options...
antstubell Posted June 3, 2019 Author Share Posted June 3, 2019 Yep, forgot that 'property', fixed that now getting errors, relating to removing the items I am sure, like this... (23,17): type mismatch on parameter 1 (did you forget a cast?)(24,17): type mismatch on parameter 1 (did you forget a cast?)(29,17): type mismatch on parameter 1 (did you forget a cast?)(30,17): type mismatch on parameter 1 (did you forget a cast?) MiscObject Property FWood AutoMiscObject Property Oil AutoMiscObject Property Rag AutoMessage Property FireLit AutoMessage Property MoreWood AutoMessage Property Ragoil AutoMessage Property NoItem AutoMessage Property Greet AutoObjectReference Property MyMarker AutoEvent OnActivate(ObjectReference akActionRef)Greet.show()Int ItemA = Game.GetPlayer().GetItemCount(FWood)Int ItemB = Game.GetPlayer().GetItemCount(Oil)Int ItemC = Game.GetPlayer().GetItemCount(Rag)If ItemA >= 3 && ItemB >= 1FireLit.show()MyMarker.Enable()Game.GetPlayer().RemoveItem(ItemA, 3)Game.GetPlayer().RemoveItem(ItemB, 1)ElseIf ItemA >= 3 && ItemC >= 1FireLit.show()MyMarker.Enable()Game.GetPlayer().RemoveItem(ItemA, 3)Game.GetPlayer().RemoveItem(ItemC, 1)ElseIf ItemA < 3MoreWood.show()ElseIf ItemA >= 3 && ItemB < 1 || ItemA >= 3 && ItemC < 1Ragoil.show()ElseIf ItemA < 1 && ItemB < 1 && ItemC < 1NoItem.show()EndIfEndEvent Link to comment Share on other sites More sharing options...
IsharaMeradin Posted June 4, 2019 Share Posted June 4, 2019 @antstubellYou are trying to remove ItemA etc from the player but those are defined as Integers. Change them to the appropriate objects that you are wanting to remove. Link to comment Share on other sites More sharing options...
c0ax599 Posted June 4, 2019 Share Posted June 4, 2019 Well antsubell, I hope you got the help you needed, and I hope you don't mind me piggybacking off your post to get a little help with my similar problem. Thanks IsharaMeradin. I'm so glad someone with your level of knowledge on this stuff is still hanging around here. Link to comment Share on other sites More sharing options...
antstubell Posted June 4, 2019 Author Share Posted June 4, 2019 @c0ax599, not at all.So I should completely remove the lines... Int ItemA = Game.GetPlayer().GetItemCount(FWood)Int ItemB = Game.GetPlayer().GetItemCount(Oil)Int ItemC = Game.GetPlayer().GetItemCount(Rag) Link to comment Share on other sites More sharing options...
antstubell Posted June 4, 2019 Author Share Posted June 4, 2019 So, eventually got it right. Script is probably way too convoluted but it works so I thought I would share it. Thanks to all for the help. MiscObject Property FWood AutoMiscObject Property Oil AutoMiscObject Property Rag AutoMessage Property FireLit AutoMessage Property MoreWood AutoMessage Property Ragoil AutoMessage Property NoItem AutoMessage Property Greet AutoObjectReference Property MyMarker AutoEvent OnActivate(ObjectReference akActionRef)Greet.show()if (Game.GetPlayer().GetItemCount(FWood) >= 3) && (Game.GetPlayer().GetItemCount(Oil) >= 1)FireLit.show()MyMarker.Enable()Game.GetPlayer().RemoveItem(FWood, 3)Game.GetPlayer().RemoveItem(Oil, 1)Elseif (Game.GetPlayer().GetItemCount(FWood) >= 3) && (Game.GetPlayer().GetItemCount(Rag) >= 1)FireLit.show()MyMarker.Enable()Game.GetPlayer().RemoveItem(FWood, 3)Game.GetPlayer().RemoveItem(Rag, 1)Elseif (Game.GetPlayer().GetItemCount(FWood) < 3)MoreWood.show()Elseif (Game.GetPlayer().GetItemCount(FWood) >= 3) && (Game.GetPlayer().GetItemCount(Oil) < 1) || (Game.GetPlayer().GetItemCount(FWood) >= 3) && (Game.GetPlayer().GetItemCount(Rag) < 1)Ragoil.show()Elseif (Game.GetPlayer().GetItemCount(FWood) < 1) && (Game.GetPlayer().GetItemCount(Oil) < 1) && (Game.GetPlayer().GetItemCount(Rag) < 1)NoItem.show()EndIfEndEvent Link to comment Share on other sites More sharing options...
IsharaMeradin Posted June 4, 2019 Share Posted June 4, 2019 What you have would work, yes. For educational purposes, the same script with a few tweaks including comment marks as to why. MiscObject Property FWood Auto MiscObject Property Oil Auto MiscObject Property Rag Auto Message Property FireLit Auto Message Property MoreWood Auto Message Property Ragoil Auto Message Property NoItem Auto Message Property Greet Auto ObjectReference Property MyMarker Auto Event OnActivate(ObjectReference akActionRef) If akActionRef == Game.GetPlayer() ; the player activated so do our thing ; because the player is the one who activated all future uses of Game.GetPlayer() within this IF block can use akActionRef instead Greet.show() Int FWoodNum = akActionRef.GetItemCount(FWood) Int OilNum = akActionRef.GetItemCount(Oil) Int RagNum = akActionRef.GetItemCount(Rag) ; because we are needing the count multiple times storing it in a local variable is faster if (FWoodNum >= 3) && (OilNum >= 1) FireLit.show() MyMarker.Enable() akActionRef.RemoveItem(FWood, 3) akActionRef.RemoveItem(Oil, 1) Elseif (FWoodNum >= 3) && (RagNum >= 1) FireLit.show() MyMarker.Enable() akActionRef.RemoveItem(FWood, 3) akActionRef.RemoveItem(Rag, 1) Elseif (FwoodNum < 3) MoreWood.show() Elseif (FWoodNum >= 3) && (OilNum < 1) || (FWoodNum >= 3) && (RagNum < 1) Ragoil.show() Elseif (FWoodNum < 1) && (OilNum < 1) && (RagNum < 1) NoItem.show() EndIf EndIf EndEvent Link to comment Share on other sites More sharing options...
Recommended Posts