eleglas Posted October 25, 2010 Share Posted October 25, 2010 Hi all, I have a very easy question (which I should know the ruddy answer to by now) for you guys: I'm trying to make an indigestible with a script on it which will add that item back to the player once he uses it. I have the script all sorted, but I'm not sure which Begin command to use, can anyone help me with this problem? I've tried OnEquip, OnActivate even ScriptEffectStart, nothing works, If I can't get this sorted I'll have to use a Gamemode, and I hate using them! Thanks. Link to comment Share on other sites More sharing options...
BEArbiter Posted October 25, 2010 Share Posted October 25, 2010 Begin ScriptEffectStart or Begin ScriptEffectEnd Link to comment Share on other sites More sharing options...
eleglas Posted October 25, 2010 Author Share Posted October 25, 2010 Like I said, I've tried those, nothing, I use the item, and it does not return. Maybe I need a better script, what I have now basically is this: If Player.GetItemCount 000Canteen == 0 Player.Additem 000Canteen 1 1 Endif I mean I've used scripts like that before in FO3, but this is my first time on NV, but it should be the same, should it not? BTW, yes I am making a simpler Canteen mod, for those of us without the classic pack. Link to comment Share on other sites More sharing options...
Brianide Posted October 25, 2010 Share Posted October 25, 2010 ScriptEffectStart should work. Do you have it set to be an effect script and not an object script? You'll probably have better luck posting the script itself here (in tags) so we can look at it, unless you have some kind of reservations about doing so. Link to comment Share on other sites More sharing options...
eleglas Posted October 25, 2010 Author Share Posted October 25, 2010 They didn't work either, not even making a new Base Effect, Actor Effect then adding it to the Item. Now I've just tried expanding it with a gamemode command, like below, still nothing happpens! Ref Canteen Begin OnAdd Set Canteen to 1 END Begin Gamemode If Canteen == 1 If Player.GetItemCount 000Canteen == 0 Player.Additem 000Canteen 1 1 Endif Endif END Link to comment Share on other sites More sharing options...
eleglas Posted October 25, 2010 Author Share Posted October 25, 2010 :blink: That's wierd, just changed it to this, and got a CTD aften using the canteen and closing pipboy. Begin Gamemode If Player.GetItemCount 000Canteen == 0 Player.Additem 000Canteen 1 1 Endif END Very strange. Link to comment Share on other sites More sharing options...
Brianide Posted October 25, 2010 Share Posted October 25, 2010 The Gamemode block stops running the moment it leaves your inventory, so that won't work. You need to add a scripted actor effect to the ingestible. Link to comment Share on other sites More sharing options...
eleglas Posted October 25, 2010 Author Share Posted October 25, 2010 I tried it again, just incase I missed something, added Base Effects and Actor Effects and added said effects to the Canteen, nothing. Link to comment Share on other sites More sharing options...
Brianide Posted October 25, 2010 Share Posted October 25, 2010 Hard to diagnose without being able to see it; there's a lot of settings that can be screwed up with base and actor effects. Best advice I can give would be to try looking at the NCR Two-Way Radio and its relevant scripts and effects, since the way it works is similar to what you seem to be going for. Wish I could be of more help. Link to comment Share on other sites More sharing options...
Recommended Posts