Speele Posted September 10, 2018 Posted September 10, 2018 Hi, I'm trying to set a CenterRef in a thread which is neither an actor or a bed, but an Xmarker. When launching the thread, actors jump to the correct 3D position, however I want them to path to this position. I can't get it work. I tried with a misc item with 3d (charcoal), result is the same. I tried (see the code below) to force path, result is the same. This thing puzzles me hard. Pathing is correct with an actor from the thread or a bed. With an XMarker, it looks ugly: actors distant from 2000+ units teleport to have sex and in some situations it's annoying. I cannot find any answer in sslActorAlias or sslThreadController/Model. I never get SexLab telling "Distance from..." in the log, only "Wait 1 cycle" (therefore after the path) sometimes. Any help will be greatly appreciated because I'm stuck on it since a week. Maybe there's no way to path to an XMarker (or anything else). In that case i will use one actor in the thread. Nevertheless, I'd have wished to understand the trick. Here's my code for launching sex after adding actors into the thread: ; configure the thread If(refVictim) thread.DisableLeadIn() thread.DisableUndressAnimation(refVictim) thread.DisableRedress(refVictim) thread.DisableBedUse() If(iSexAct == _Data.SEX_NECRO) || (iSexAct == _Data.SEX_GROUPNECRO) || (iSexAct == _Data.SEX_HAREMNECRO) || (iSexAct == _Data.SEX_NECROFEM) k = 0 While(k < arSexers.Length) If(arSexers[k].GetActorValue("Health") < 2) thread.DisableRagdollEnd(arSexers[k]) sslBaseVoice vVoice = SexLab.GetVoice(arSexers[k]) thread.SetVoice(arSexers[k], vVoice, True) EndIf k += 1 EndWhile EndIf ; that means: center sex anim at 10% of the distance from the partner (1) to the initiator (2) ; if distance is 1500 units, then sex'll start at 150 units from the partner PlaceSexMarker(refPartner, refInitiator, 0.1) refSexMarker.SetPosition(refSexMarker.GetPositionX(), refSexMarker.GetPositionY(), refPartner.GetPositionZ()) thread.CenterOnObject(refSexMarker) Else If(!refBed) && (refPartner) refBed = Game.FindClosestReferenceOfTypeFromRef(SexLab.Config.LocationMarker, refPartner, 750.0) If(!refBed) If(refInitiator.GetLeveledActorBase().GetSex() == _Data.SEX_MALE) PlaceSexMarker(refPartner, refInitiator, 0.3) refSexMarker.SetPosition(refSexMarker.GetPositionX(), refSexMarker.GetPositionY(), refPartner.GetPositionZ()) thread.CenterOnObject(refSexMarker) Else PlaceSexMarker(refInitiator, refPartner, 0.3) refSexMarker.SetPosition(refSexMarker.GetPositionX(), refSexMarker.GetPositionY(), refInitiator.GetPositionZ()) thread.CenterOnObject(refSexMarker) EndIf EndIf ElseIf(refBed) thread.CenterOnObject(refBed) thread.SetBedFlag(1) EndIf Location loc = refPlayer.GetCurrentLocation() If(loc) && (loc.HasKeyword(_Data.refLocTypePlayerHouseKeyword)) k = arSexers.Length While(k > 0) k -= 1 If(arSexers[k] != refPlayer) thread.DisableRedress(arSexers[k]) EndIf EndWhile EndIf EndIf thread.SetHook("StageChange") thread.SetHook("SexEnd") arAnims = sslUtility.ShuffleAnimations(arAnims) thread.SetAnimations(arAnims) ; I have a bug here, actors jump to position instead of running for it if I use the sex marker, which is a XMarker ;thread.CenterAlias.ForceRefTo(refSexMarker) ;thread.ForcePathToCenter(None, True) thread.StartThread()
Speele Posted September 11, 2018 Author Posted September 11, 2018 After spending another evening on the matter I get it fixed nicely.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.