konnierizzle1 Posted February 7, 2014 Share Posted February 7, 2014 (edited) I'm trying to make a book activate and apply Sanguinare VampirisI keep getting the error type mismatch on parameter 1 (did you forget a cast?) Scriptname SanguinareVampirisBook extends ObjectReference {Book Script} Event OnActivate(ObjectReference akActionRef) Game.GetPlayer().AddSpell(04032039) Debug.MessageBox("You Receive Augustine's Gift of Immortal Life")endEvent Any help would be appreciated, thanks. Edited February 7, 2014 by konnierizzle1 Link to comment Share on other sites More sharing options...
CraftySentinel Posted February 7, 2014 Share Posted February 7, 2014 (edited) On 2/7/2014 at 12:35 AM, konnierizzle1 said: Game.GetPlayer().AddSpell(04032039) Papyrus doesn't use formIDs directly like that (Which is why you get the error ;) ). There's a few ways you can get a form into a script the easiest probably using a property, so add this just under your ScriptName and Description lines:Spell Property SanguinareVampiris Autoand replace: Game.GetPlayer().AddSpell(04032039) with Game.GetPlayer().AddSpell(SanguinareVampiris)Compile it and then right click the script and head into Edit Properties and and 'fill' the property with the spell you want. (If your property name Matches a Form that is a Spell you can also just click auto fill and it will do it for you.) Edited February 7, 2014 by CraftySentinel Link to comment Share on other sites More sharing options...
konnierizzle1 Posted February 7, 2014 Author Share Posted February 7, 2014 (edited) The script compiled! You are my hero!But the disease isn't applying itself on my character, I had set up a custom effect for this, can I do it with the regular spell instead? Probably worth a shot. Here's what it looks like now, I assume I'd need to replace AugustinesGift with DiseaseSanguinareVampiris. Quote Scriptname SanguinareVampirisBook extends ObjectReference {Book Script} Spell Property AugustinesGift Auto Event OnActivate(ObjectReference akActionRef) Game.GetPlayer().AddSpell(AugustinesGift) Debug.MessageBox("You Receive Augustine's Gift of Immortal Life")EndEvent It's done, I had to add the PlayerVampireQuestScript to the book as well, didn't think about it until now, thank you for the help with this, I was bangning my head against my keyboard for 6 hours today at least!Once again, you are my absolute hero right now. Edited February 7, 2014 by konnierizzle1 Link to comment Share on other sites More sharing options...
Recommended Posts