ApocNizmith Posted August 26, 2014 Share Posted August 26, 2014 (edited) scn aaSE09SkeletalHound01 short buttonshort dismissshort Ownedfloat alpha begin OnDeathset aaSE09SkeletalHound01.Summoned to 0set Owned to 0end begin OnActivate if ( IsActionRef Player == 1 ) && ( Dismiss < 1 )if ( GetDead == 0 )Messagebox "What is your command?","Follow","Wait","Dismiss"elseif ( GetDead == 1 )Activateendifendif end begin gamemode if ( aaSE09SkeletalHound01.Summoned == 1 ) && ( Owned == 0 ) && ( Dismiss < 1 )SetOwnership PlayerFactionSet Owned to 1endif if Dismiss == 1playsound SPLPoisonCastremovespell ABGhostNPCEffectset alpha to alpha - .01setactoralpha alphaif alpha < 0Disableset Dismiss to 0endifendif set button to getbuttonpressedif button > -1if button == 0Set aaSE09SkeletalHound01.Follow to 1EvpMessage "Your Abyssal Skinned Hound is now following"elseif button == 1Set aaSE09SkeletalHound01.Follow to 0EvpMessage "Your Abyssal Skinned Hound is now waiting"elseif button == 2Message "You have dismissed your Abyssal Skinned Hound"set alpha to 1set dismiss to 1set aaSE09SkeletalHound01Ref.Summoned to 0set Owned to 0endifendif Yet this script works:scn AAACitadelAltarScriptshort buttonshort summonedbegin OnActivateif ( IsActionRef Player == 1 )if ( Summoned < 1 )Messagebox "What type of Abyssal Gaurdian do you wish to bind?","Hound","Skeletal","Flesh","Done"elseMessage "You may only have one Abyssal Gaurdian bound to you at a time."endifendifendbegin gamemodeset button to getbuttonpressedif button > -1if button == 0if ( Player.GetItemCount Nightshade >= 3 )Playsound SPLPoisonCastaaSE09SkeletalHound01BirthMarker.Placeatme aaSE09SkeletalHound01Player.RemoveItem Nightshade 3set Summoned to 1elseMessage "This requires 3 Nightshade."endifelseif button == 1if ( Player.GetItemCount Nightshade >= 5 )Playsound SPLPoisonCastaaCreatureSkeleton4ChampionBirthMarker.Placeatme aaCreatureSkeleton4ChampionPlayer.RemoveItem Nightshade 5set Summoned to 1elseMessage "This requires 5 Nightshade."endifelseif button == 2if ( Player.GetItemCount Nightshade >= 10 )Playsound SPLPoisonCastaaSE09BattleAtronachFlesh02BirthMarker.Placeatme aaSE09BattleAtronachFlesh02Player.RemoveItem Nightshade 10set Summoned to 1elseMessage "This requires 10 Nightshade."endifelseif button == 3endifendifendifend Doesn't recognize function Summoned, but will summon creature? How do I fix this? Edited August 26, 2014 by ApocNizmith Link to comment Share on other sites More sharing options...
DrakeTheDragon Posted August 27, 2014 Share Posted August 27, 2014 In Oblivion creatures don't have attributes named "Summoned" or "Follow". These lines will produce compiler errors.In fact nothing has any attributes like that at all. The only thing you can "."-connect to objects like this is function calls, like "PlaceAtMe" as done above with the markers. You cannot store arbitrary attributes on objects like this. You can have a script running on the creatures which stores some attributes for them, but these attributes can also only be used from inside the same script. Your "aaSE09SkeletalHound01" script is running on the creatures I guess, from using OnDeath and OnActivate blocks. And scripts like this won't "share" their variables' values with others. So why not just declare the "Follow" and "Summoned" variables as local variables of this script and set or check them the same way as done in the below script? As long as the creature instance exists these variables will keep their values, other instances of the same creature will keep their own values separate from these, so you can use them to store certain states of the creature and the like just as well as if they 'were' attributes of the creature. What you cannot do by this is checking their values from another script, like from outside the creature though. But I'm not seeing you doing this here, so you should be lucky and it should work that way instead just fine. I'm not sure how you'd go about making the creature follow, but setting an attribute "Follow", which doesn't exist and cannot be assigned, and executing "Evp" will certainly not work. Nor will you be able to use the local variable "Follow", if declared inside the script as told, for checking it from inside a package condition or something. But there are different ways to tell an actor to use its follow AI package now, I just don't know anything about this myself yet. Link to comment Share on other sites More sharing options...
ApocNizmith Posted August 27, 2014 Author Share Posted August 27, 2014 Awesome I will try that instead. If I use a local variable to interact with them it may work I will give it a try. I was attempting to make it call a reference but I will attempt a AI package or another script to interact with them XD TY Drake Link to comment Share on other sites More sharing options...
Recommended Posts