squidgy617 Posted December 14, 2012 Share Posted December 14, 2012 (edited) Bear with me here. Still learning scripting. I know whatever I've missed is something stupid, but I can't learn without help, I suppose. Here's my script: Scriptname abTameableAnimalScript extends activemagiceffect Actor property Player Auto Event OnActivate(ObjectReference akActionRef) if self.IsHostileToActor(Player) self.SetAlert() else self.ShowGiftMenu(true, OnlyFoodList, true, false) endIf EndEvent Event OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer) if akSourceContainer == Game.GetPlayer() int random = Utility.RandomInt(1, 2) endif If Utility.RandomInt() = 1 self.SetAlert() else self.kill endif EndEvent I get this error: required (...)+ loop did not match anything at input '='No output generated for abTameableAnimalScript, compilation failed. What's wrong there? I'm not sure what's wrong with that equal sign, but eh. Thanks in advance. Edited December 14, 2012 by squidgy617 Link to comment Share on other sites More sharing options...
steve40 Posted December 14, 2012 Share Posted December 14, 2012 (edited) This compiles, but I don't know if it will work. Scriptname abTameableAnimalScript extends Actor Actor property Player Auto FormList Property OnlyFoodList Auto Event OnActivate(ObjectReference akActionRef) if IsHostileToActor(Player) SetAlert() else ShowGiftMenu(true, OnlyFoodList, true, false) endIf EndEvent Event OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer) if akSourceContainer == Player int random = Utility.RandomInt(1, 2) If random == 1 SetAlert() else kill() endif endif EndEvent Edited December 14, 2012 by steve40 Link to comment Share on other sites More sharing options...
squidgy617 Posted December 14, 2012 Author Share Posted December 14, 2012 Lemme test it, I'll let you know the results. Link to comment Share on other sites More sharing options...
squidgy617 Posted December 14, 2012 Author Share Posted December 14, 2012 Okay, no error compiling, but I don't know how to make the creature that the script is attached to activateable. The script is attached to a magic effect. The effect is attached to a spell. The spell is attached to a race. But I can't actually activate the creature once its spawned. How do I make it activateable? Or should I try some other alternative? Link to comment Share on other sites More sharing options...
squidgy617 Posted December 15, 2012 Author Share Posted December 15, 2012 Bump. Link to comment Share on other sites More sharing options...
squidgy617 Posted December 15, 2012 Author Share Posted December 15, 2012 Bump. Link to comment Share on other sites More sharing options...
steve40 Posted December 15, 2012 Share Posted December 15, 2012 The script won't work on a magic effect. It should be attached directly to an npc. Link to comment Share on other sites More sharing options...
squidgy617 Posted December 16, 2012 Author Share Posted December 16, 2012 Directly to an actor? It won't let me place any scripts on the actor. The script section is greyed out. I'm trying to put it on the EncSabreCat actor. Link to comment Share on other sites More sharing options...
steve40 Posted December 16, 2012 Share Posted December 16, 2012 (edited) If the actor is used in a leveled list, the script section will be greyed out, so you have to put the script on the leveled list version of the actor (the object that the spawner uses). EDIT: put the script on "LvlSabreCatAll". Edited December 16, 2012 by steve40 Link to comment Share on other sites More sharing options...
squidgy617 Posted December 16, 2012 Author Share Posted December 16, 2012 I'm sorry, I'm not sure I quite understand. Again, I am very noobish at this. Where exactly do I go to find the leveled version of the actor, in this case EncSabreCat? I'm looking right now, not seeing where the leveled list version is. If I go to the leveled list it is included in and double-click it from there, its still the same actor. I still can't place a script on it. Link to comment Share on other sites More sharing options...
Recommended Posts