JimmyRyder Posted March 2, 2017 Share Posted March 2, 2017 (edited) Hello. What is wrong with my script? I put a unique book for sell on Ralph selling container, you must buy it and read it to get the perk and a message that displays you have the perk. But it only works one time, when you reload you save and try to equip the book, it doesn't do anything. How to make it consistant?Here's the script I attached to the book. scn EnglishBookSCRIPT int bDoOnce begin OnAdd player setobjectivecompleted MamboQuest01 70 1 setobjectivedisplayed MamboQuest01 75 1 end begin OnEquip player If GetStage MamboQuest01 > 0 if bDoOnce else;if bDoOnce == 0 set bDoOnce to 1 Equipitem EnglishBook01 addperk EnglishBookPERK 1 showmessage EnglishBookMESSAGE 0 setobjectivecompleted MamboQuest01 75 1 RemoveMe endif endif end Video shows up the issue Thanks for your help. Edited March 3, 2017 by JimmyRyder Link to comment Share on other sites More sharing options...
Mktavish Posted March 3, 2017 Share Posted March 3, 2017 (edited) Well you're not really equipping the book , you are consuming it. So Just like any consumable ... only one time.Now the question is ... why is it still in your inventory ? Hmmm ... maybe that "Removeme" is causing problems ... you shouldn't have to remove a consumable. Oh wait ... are you using a misc item book ? In which case you cannot run "OnEquip" for that kind of book. Edited March 3, 2017 by Mktavish Link to comment Share on other sites More sharing options...
JimmyRyder Posted March 3, 2017 Author Share Posted March 3, 2017 Thanks for reply. I have no idea, but I read on the GECK website that a Book triggers any "OnEquip" blocks in the bookscript. Is it because I haven't put any skill to it? (like speech, energy weapon) Link to comment Share on other sites More sharing options...
Mktavish Posted March 3, 2017 Share Posted March 3, 2017 sorry you ninja'ed my last edit ... or I ninja'ed you ... lol Read that. Link to comment Share on other sites More sharing options...
JimmyRyder Posted March 3, 2017 Author Share Posted March 3, 2017 Lol I use a real book, not a misc item. Without the "removeme" the message displays but the book stays in inventory, everytime I click it displays the messagebox. And without when I launch the game and play. Clicking on the book it displays the message and remove the book. YES! But if I load my save and try it, it won't trigger anything, just clicking has no effect. Link to comment Share on other sites More sharing options...
Mktavish Posted March 3, 2017 Share Posted March 3, 2017 (edited) Geck wiki on "EquipItem" says this ... Ingestibles can be passed as the item to equip, resulting in the actor consuming the indicated item as normal, provided they have at least one in their inventory. Is there one of the book in inventory? But honestly I am not understanding your dilema really. What is the effect that the book gives ? Are you saying it is temporary ,,, then when buying another from the vendor ... it no longer will give the temporary effect? Edited March 3, 2017 by Mktavish Link to comment Share on other sites More sharing options...
Mktavish Posted March 3, 2017 Share Posted March 3, 2017 Honestly I am not real familiar with NV ... But it sounds like when you consume the book ... it is putting a collectable item (static object) in your inventory which has no script functionality. I know there was a Fo3 mod that did this. And if this became hard coded for FNV ... I wasn't aware.Which basically means the consumable object no longer exists. Same as a stimpak ... only you don't get a collectible syringe to put on your home shelf. Link to comment Share on other sites More sharing options...
JimmyRyder Posted March 3, 2017 Author Share Posted March 3, 2017 (edited) Fo3 and FNV are pretty much the same deal. I'm trying to explain: Usually, when you consume a book you get "Skill +1" and the item is removed from inventory (since you used it)What I want is: when you read THAT book I made, a perk (I created) is added and messagebox displays to explain that the perk has been added. First time I click on THAT book to consume it, the messagebox displays, the item is removed (but I don't see if the perk is added): IT WORKS 75%. What the problem is: When I load the game on the same session after having consuming the book once, clicking on the book has 0 effect. If you still don't understand I can make a short video that shows up the issue. Thanks for trying to help I appreciate ! Edited March 3, 2017 by JimmyRyder Link to comment Share on other sites More sharing options...
Mktavish Posted March 3, 2017 Share Posted March 3, 2017 (edited) Why do you still have the book to click on ? Is it because you bought it from the vendor ... again ? Unless you some how tell it to remove the perk ... why does the player not still have the perk? Maybe you cannot get a perk added message if you the player ... still have the perk in question ? Sure make a video ... picture is worth thousand words. Edited March 3, 2017 by Mktavish Link to comment Share on other sites More sharing options...
JimmyRyder Posted March 3, 2017 Author Share Posted March 3, 2017 (edited) I really don't know maybe the problem isn't from the script? Maybe I did something wrong elsewhere? It's very odd, it happens after I LOADED the game. Clicking on the book doesn't activate the message or remove the book. First time it works, but if I load: doesn't do anything. When I mean load, I mean before using the one unique book that must add the perk. I'll get you a video soon. Edited March 3, 2017 by JimmyRyder Link to comment Share on other sites More sharing options...
Recommended Posts