CyberQueen Posted October 9, 2024 Posted October 9, 2024 Okay so I'm hoping someone can send me a layout of what script I need; so here's what I'm trying to do: Me and my follower's(Let's say it's just Serana and Lydia) are exploring a cave; I walk through a trigger box, three monsters are spawned (Let's just say trolls) and then three different animation start between the three of us and the trolls. What I want is a script that will check if I have followers, how many I have, and then pair them up with the trolls; so if it wasn't Serana and Lydia and just two other girls, or if I only had one follower or even five followers how would I do that? I know how to set up everything else. Thanks!
MTB Posted October 10, 2024 Posted October 10, 2024 (edited) To find specific things, like follower (faction members) I would use a quest; have several aliases with fill on conditions (eg current follower faction member), likely you'll want in current area set, disallow reuse in quest. Then start the quest in the triggerbox script. You can also use the quest to handle the animation(start) or even a scene, or you can script that elsewhere like in the triggerbox script; you can set the first alias to required so start fails if you have no followers, rest as optional and walk through the aliases until one is not set. (They fill in the order.) Edited October 10, 2024 by MTB
CyberQueen Posted October 14, 2024 Author Posted October 14, 2024 On 10/10/2024 at 3:36 PM, MTB said: To find specific things, like follower (faction members) I would use a quest; have several aliases with fill on conditions (eg current follower faction member), likely you'll want in current area set, disallow reuse in quest. Then start the quest in the triggerbox script. You can also use the quest to handle the animation(start) or even a scene, or you can script that elsewhere like in the triggerbox script; you can set the first alias to required so start fails if you have no followers, rest as optional and walk through the aliases until one is not set. (They fill in the order.) Okay, would you be able to give an example of what the script might look like? And this would be one I'd put under the scripts tab right?
MTB Posted October 14, 2024 Posted October 14, 2024 > example of what the script might look like? So if you were to put the script on a new type of triggervolume you could use something like this basic example for a use once trigger without any post scene handling etc. (If you're not using the quest for anything else then a better design might be to handle thing there.) (Not tested it compiles; may have typos, but should give the idea.) Scriptname SexyTimeOnPlayerEnter extends ObjectReference ; Put this script on the trigger volume. SexlabFramework property SexLab auto ; Ref to the framework for starting scenes. autofill Actor property PlayerRef auto ; autofill. Quest property FindFollowerQuest auto ; name of Quest with aliases Follower1, 2, etc. filled by conditions. First required rest optional. Then autofill. ActorBase property PartnerType auto ; Fill with what ever should be summoned Auto State active Event OnTriggerEnter(ObjectReference akActionRef) if akActionRef == PlayerRef ; Player entered the trigger, time to react. GoToState( "Inactive" ) ; Prevent multiple triggers HandleTrigger() endif EndEvent endState State inactive endState Function HandleTrigger() { Function that reacts to the trigger, customize as needed. } ; Deal with player: Actor PlayerPartner = PlayerRef.PlaceAtMe( PartnerType ) as actor PlayerPartner.SetAV( "Confidence", 0 ) ; make them not attack, there are better ways... SexLab.QuickStart( PlayerRef, PlayerPartner ) if FindFollowerQuest.start() ; Start succeeded so there are followers in the loaded area. ReferenceAlias a = FindFollowerQuest.GetAliasByName( "Follower1" ) as referenceAlias Actor Follower1 = a.getRef() as Actor Actor Follower1Partner = Follower1.PlaceAtMe( PartnerType ) as actor Follower1Partner.SetAV( "Confidence", 0 ) SexLab.QuickStart( Follower1, Follower1Partner ) a = FindFollowerQuest.GetAliasByName( "Follower2" ) as referenceAlias Actor Follower2 = a.getRef() as Actor if Follower2 Actor Follower2Partner = Follower2.PlaceAtMe( PartnerType ) as actor Follower2Partner.SetAV( "Confidence", 0 ) SexLab.QuickStart( Follower2, Follower2Partner ) endif ; a = ... Keep going if you support even more followers... endif EndFunction
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now