demonofsarila Posted May 15, 2016 Share Posted May 15, 2016 (edited) Ok so from what I've read online and in source code, one way to get a set of effects (like say str +1 or int -2) to show up in the pitboy and effect the player is add them to a potion and then in a script use equipitem to add the potion. Only problem is I cannot get it to work and have no idea why. The CK compiler throws no errors. Since the script I'm working on is currently just shy of 300 lines, here's the relevant parts: Actor PlayerPotion Property MyAwesomePotion Auto ConstFunction msg(string asTextToPrint) Debug.Notification("DEBUG: " + asTextToPrint)EndFunction Event OnInit() Player = Game.GetPlayer() RegisterForRemoteEvent(Player, "OnPlayerLoadGame")EndEventEvent Actor.OnPlayerLoadGame(actor aSender) Player = Game.GetPlayer() Player.EquipItem(MyAwesomePotion, true, true) msg("Added MyAwesomePotion: " + Player.IsEquipped(MyAwesomePotion))EndEvent And yes I've gone into the properties of my script and added the default value for MyAwesomePotion as MyAwesomePotion that I made out in the object window. But when I load a save, I see the message/notifcation "DEBUG: Added MyAwesomePotion: false" and the character has no status effects in their pitboy so idk wtf is going on and what I did wrong. My big goal is to temporarily raise/lower some of the SPECIAL stats with a few different sets, similar to how being thirsty or hungry in the HC survival temporarily lowers some of your SPECIAL stats. And I'm totally open to better ways to do that as long as they work. Edited May 15, 2016 by demonofsarila Link to comment Share on other sites More sharing options...
Recommended Posts