prideslayer Posted November 18, 2011 Posted November 18, 2011 Seeking a wider audience here. As some of you already know, I'm working on an update to Sexout, which I'm calling SexoutNG, that adds a lot of new features and animations. Work is basically done and ready for beta testing, but I'm having a problem that I have not yet been able to solve. The update uses a new system for just about everything, including actor positioning. It "has to", as supporting 3-actor scenes requires somewhat more complicated actor positioning. Working details are in the spoiler, but please read the questions below before the spoiler; maybe there is something simple I'm overlooking that is basically irrelevant to the details. SexoutNGBegin spell does the normal stuff. Main quest variable copying, actor validation, etc. If all the checks pass, then the following takes place for each involved actor, from 1 to 3. (named A, B, and C). (in the spell effect:) 1. If actorA and actorB are set, ActorA is moved to ActorB and turned 180 degrees. 2. ActorA is set restrained and given an undress token. 3. If ActorB is set: If npc, set restrained. Given an undress token. 4. if ActorC is set: If npc, set restrained. Moved to actorB, rotated to face the same direction as actorb, and given an undress token. 5. All involved actors are given Animation position counter tokens. 6. All involved actors are given Animation position ID tokens. 7. (script waits for expiration) 8. Above is undone, actors given an SexoutNGAnimStop token. Items 5, 6, and 8 are unscripted tokens used to pass data, basically the same as is done in sexout. The actor will get anim # of SexoutNGAnimPosition tokens, and actor A gets a SexoutNGAnimPositionA token, B gets a B token, and C gets a C token. The A, B, and C tokens are scripted, as is the undress token. The undress token script simply undresses the actor when there is only 1 in the inventory, and redresses them and removes both when there are two in the inventory. The 'meat' of the animation control happens in the script for the A, B, C tokens. It does this: (in OnAdd) 1. If actor is NPC, set the script package to SexoutDoNothing. 2. Set init flag. (in GameMode) 1. Check for shutdown flag, do shutdown if set (this works fine) 2. If running, check for 'stop' flag (token mentioned above), if set: 2.1 Remove stop token. 2.2 Remove spinlock token. 2.3 Wait predetermined amount of time (right now 0.5 seconds) 2.4 Remove anim counter tokens. 2.5 PickIdle. 3. If running and not stopped, check for anim counter tokens, and if set: 3.1 For actorA and actorC (actorB is never moved or turned) 3.1.1 Setup anim # specific offset variables. 3.1.2 Calculate distance to move from current position. 3.1.3 Use setPos to move actor. 3.2 If actor is player, start UFO cam and disable controls. 3.3 PickIdle 3.4 Start waiting for stop flag (step 2). Right now, I've disabled the setpos in the animation control item script, which is responsible for setting the offset. The actors are all being moved to exactly the same position and left there. What is happening is that when two NPCs are close to one another or overlapping, they will 'slide away' from each other while the animation plays, until they are no longer touching. This does not happen when it is player + NPC, only NPC + NPC. So what's the trick? Why do two NPCs refuse to 'touch'? It works fine in the sexout script, and I'm doing basically the same things, in the same order. The spoiler above has all the details. The main difference is that all the moving happens in a single script (and thus in a single frame) within "old" sexout, whereas I move the actors onto one another initially, and then it's up to individual scripted items to adjust them into the right positions for the individual animations. I thought that this 'move twice' thing might be to blame, so I tried setting them 128 apart from one another in the main effect so they would definitely not be touching, and then moving them into the correct positions touching in the item script, but to no avail -- if it's two NPCs, they will still 'drift' apart. I'm hoping there's just some call I've overlooked that tells the engine to ignore collisions/clipping for an actor, but I haven't found one yet. The only ones that do this disable everything including scripts and animations. Any help is appreciated!
prideslayer Posted November 18, 2011 Author Posted November 18, 2011 At this point I'm half tempted to just brute-force it, this issue is irritating me so much. If I setup the position vars, I can call SetPos on every actor, every frame, in GameMode. I don't think that will hurt performance any, and it might be the only way to ensure this silly thing works.
Guest Donkey Posted November 18, 2011 Posted November 18, 2011 The sliding is part of the collision detection.. Are you sure it is only setrestrained in sexout.esm by UDLR ?? I will have to check it. Will get back to you.. I see they also use SetUnconscious 1 not sure if you need this part too..
prideslayer Posted November 18, 2011 Author Posted November 18, 2011 The sliding is part of the collision detection.. Are you sure it is only setrestrained in sexout.esm by UDLR ?? I will have to check it. Will get back to you.. I see they also use SetUnconscious 1 not sure if you need this part too.. I had SetUnconscious for a while as well, but when I went back and looked at sexout, that one is/was commented out. Is it not commented in your version? This is what's in mine: ; ; Restrain participants ; ; Restrain participants set mRestrained to male.GetRestrained set fRestrained to female.GetRestrained ; if male != player male.SetRestrained 1 ; male.SetUnconscious 1 ; endif ; if female != player female.SetRestrained 1 ; female.SetUnconscious 1 ; endif Only SetRestrained is actually being done. Also, my clever brute force plan doesn't work either. It keeps the positions right, but SetPos causes the actor to turn invisible while moving -- which is all the time. Oops.
Guest Donkey Posted November 18, 2011 Posted November 18, 2011 It is on mine too, but in the script in the bottom there is SetUnconscious 0 so if there is a 0 somewhere maybe another script that makes it 1 or else SetUnconscious 0 this has no function at all. And could also be commented out. I am not even sure setRestrained is even needed. Sexout has some code from sexus and neither fallout 3 or new vegas uses these commands.
prideslayer Posted November 19, 2011 Author Posted November 19, 2011 Gah. Just found in the main sexout script, it's also using my 'brute force' idea. Every frame the timer isn't expired, it does a SetPos. I've been using MoveTo. Maybe that was responsible for the invisibility when I tried it; going to check now.
Guest Donkey Posted November 19, 2011 Posted November 19, 2011 Glad you got it sorted out, so it wasn't SetRestrained.
prideslayer Posted November 20, 2011 Author Posted November 20, 2011 Glad you got it sorted out' date=' so it wasn't SetRestrained. [/quote'] Yep. Thought there must be a way to turn off collision detection or something, but no. Just figure out the positions then keep moving them back there faster than the player can notice.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.