SKYZOO Posted May 2, 2016 Share Posted May 2, 2016 (edited) So I am in need of a small script . It uses a clean tv set as an activator, that would be "broken and replaced by a dirty tv set and have a key & glass pop out---only if having the required item to do so". I have made the TVSET an activator already, and placed the static TVSET DIRTY (the broken / off one) as initially disabled. I have placed GLASS SHARDS and a "Mysterious Key" in front of it, also initially disabled. Everything is set as a persistent REF. I just need a script to allow or deny breaking the Tv set, with the condition depending on the players inventory for the specific "breaking item" (which would be a temporary quest item, but that's another story). Then the clean Tv set would be disabled, enabling the dirty Tv set and glass shards + key to pop in place, as to appear if the player had struck the glass and this resulted from it. It seems a lot more simple than it is to type out...Any help is appreciated. (P.S.: I know I'll have to create a message to be displayed via script command on denying breaking the TV, and also the script is meant as a once only, non repeatable action once allowed via item in inventory.) Edited May 2, 2016 by SKYZOO Link to comment Share on other sites More sharing options...
Jokerine Posted May 2, 2016 Share Posted May 2, 2016 (edited) Okay. Make a startup message as a message box that says something like "What would you like to do?" with two buttons, the first to say "break tv" and the second "nothing". Also make another failure message (2 second duration, not a message box) that says "you don't have the required item" or something. Then make a script like this. scn BreakableTVScript Short button ;-----------SHOW STARTING MESSAGE------------- begin OnActivate Player ShowMessage StartUpMessage end ;-----------MENU SELECTION------------------- Begin MenuMode set button to getbuttonpressed ;-----------IF PLAYER CHOOSES BREAK---------------------- ;-----------AND HAS AT LEAST ONE BREAK ITEM ------------- ;-----------PLAY SMASH SOUND AND DISABLE STUFF----------- if (button ==0) if Player.GetItemCount BreakingItem >= 1 playsound FXBulletImpactGlass TVSetCleanREF.Disable 0 TVSetDirtyREF.Enable 0 ShardsREF.Enable 0 KeyREF.Enable 0 ;-----------IF PLAYER CHOOSES BREAK ------------- ;-----------AND HAS NO BREAK ITEM --------------- ;-----------SHOW FAILURE MESSAGE ---------------- else ShowMessage FailureMessage ;-----------ALL DONE YAY------------------------- endif endif END I didn't test it but I think it should work. Just replace the REF and message IDs with your own stuff. Good luck! :smile: EDIT: If ya wanna remove the breaking item once you smash the TV, just add a Player.RemoveItem BreakItem 1 after the PlaySound line. EDIT EDIT: Tweaked a few things... Should be good now! Edited May 2, 2016 by Jokerine Link to comment Share on other sites More sharing options...
SKYZOO Posted May 3, 2016 Author Share Posted May 3, 2016 You are a rock*. I will try this tonight, and see how I do. It looks pretty straight forward, I think all will work out good. Fingers crossed & thanks for the speedy response, I had to run off to work right after my post. I'll let you know how it goes. :thumbsup: Link to comment Share on other sites More sharing options...
Jokerine Posted May 3, 2016 Share Posted May 3, 2016 Awesome, good luck! :) Link to comment Share on other sites More sharing options...
SKYZOO Posted May 4, 2016 Author Share Posted May 4, 2016 (edited) That worked out great, thank you again for the help! :D I was actually able to tweak it to work three different ways with three separate activators, now the mod is finally coming together the way I'd imagined it. :dance: Cheers! Edited May 4, 2016 by SKYZOO Link to comment Share on other sites More sharing options...
Jokerine Posted May 4, 2016 Share Posted May 4, 2016 Cool beans! Good luck with the rest, friend :) Link to comment Share on other sites More sharing options...
Recommended Posts