dianacat777 Posted September 15, 2012 Share Posted September 15, 2012 All right, so I have a problem that I'm not sure how to tackle. I want to, given that the character has a certain perk, make it so that a (random) message will appear when the player eats a food item. Bonus points if there's a random chance this message appears rather than a 100% rate. I can't exactly create new items with an effect to work on, because it's existing food I'm messing with. Anyway, I'm at a loss as for what to do with this. Can somebody more experienced please give me some pointers? And what sort of activation would that script use? OnEquip doesn't seem to work with food. Link to comment Share on other sites More sharing options...
viennacalling Posted September 15, 2012 Share Posted September 15, 2012 Disclaimer: I'm not sure this is the best method. 1. Create a script with a ScriptEffectStart block. Inside that block call GetRandomPercent and depending on the result display your message.2. Create an effect that uses said script.2. Add that effect to the food with the condition that the player has a certain perk. Link to comment Share on other sites More sharing options...
dianacat777 Posted September 16, 2012 Author Share Posted September 16, 2012 Better than what I have. *ambles off to figure out how to use getrandompercent* Link to comment Share on other sites More sharing options...
Deleted2547005User Posted September 16, 2012 Share Posted September 16, 2012 (edited) That is the correct method. Create a Base Effect for the food items, then add a script to that Base Effect (script must be an Effect script - not an object or quest script). The Script would look like this scn FoodThingyScript int irand ;random number Begin ScriptEffectStart set irand to GetRandomPercentif irand > 50ShowMessageendif End Edited September 16, 2012 by Kuroitsune Link to comment Share on other sites More sharing options...
Recommended Posts