Eluwil Posted July 16, 2020 Share Posted July 16, 2020 (edited) I'm trying to move a rowboat back and forth from a larger ship to shore everytime you activate it. The first time I activate the boat everthing works fine but the second try it seems to have fadeOut and Timer issues. the boat teleports immediately to the coordinates and the starts to fadeout and in Also when I try to position the Rowboat back to its original location it bugs out and spawns at a 45 degree angle. I tried using the SetAtStart function but it doesn't seem to work as the boat doesn't move. I've remade the script to test it out with just the rowboat and no extra statics to move. This is the test script:-------------------------------------------------------------------------------------------------------------------------begin "ABE_RowboatTest"short statefloat timerif (OnActivate == 1) if (state == 0) FadeOut, 2 set state to 1 Activate endif if (state == 2) FadeOut, 2 set state to 3 activate endifElseIf (OnActivate == 0) if (state == 0) Return elseif (state == 2) return endifendifif (state == 1) set timer to (timer + GetSecondsPassed) if (timer > 2) Position, 61356, 184369, 2, 11 FadeIn, 2 set state to 2 elseif (timer < 3) return endifendifif (state == 3) set timer to (timer + GetSecondsPassed) if (timer > 2) Position, 61174, 184920, 2, 314, FadeIn, 2 set state to 0 elseif (timer < 3) return endifendifEnd-------------------------------------------------------------------------------------------------------------------Since I couldn't move it back to it's original place within the editor I now moved it to a different location and am trying make the boat position between those coordinates, while fading out and then in again. fadein only works propely the first time though. any Ideas? and does anybody know how to get the SetAtStart Function to work? Edited July 16, 2020 by Eluwil Link to comment Share on other sites More sharing options...
Oblivionaddicted Posted July 16, 2020 Share Posted July 16, 2020 You should probably mention the cells' coordinates. Link to comment Share on other sites More sharing options...
Eluwil Posted July 16, 2020 Author Share Posted July 16, 2020 (edited) isn't that only necessary when using the positioncell function? sometimes the positioncell works better and at other times just the Position fuction works better.I tried specifying the coordinates both with the Position function and the PositionCell function, PositionCell function doesn't move the boat to it's new coordinates but the Position function does.The Fadeout issues remain.Also I'm moving the boat within the same exterior cell Edited July 16, 2020 by Eluwil Link to comment Share on other sites More sharing options...
Oblivionaddicted Posted July 16, 2020 Share Posted July 16, 2020 I'm not an expert on scripts and I suppose you don't have anything to lose trying it. Link to comment Share on other sites More sharing options...
Eluwil Posted July 16, 2020 Author Share Posted July 16, 2020 I already did try it, doesn't work. Fadeout and timer issues remain after activating the first time. first time activation works fine it's after that it starts to get issues. Link to comment Share on other sites More sharing options...
Oblivionaddicted Posted July 16, 2020 Share Posted July 16, 2020 Good luck then! Link to comment Share on other sites More sharing options...
cyran0 Posted July 16, 2020 Share Posted July 16, 2020 You forgot to reset timer to zero after the first 'movement' cycle (and again after the second cycle). When state = 3, the condition timer > 2 is immediately satisfied and it executes the move (Position) without pause. The FadeOut still executes normally. For the function Position, the rotation about the z-axis is in minutes of arc rather than degrees, so there is little difference between 11 and 314. If those are the in-world angles you want, multiply them by 60 before assigning the values to Position. I'm a big fan of hiding 'how the sausage is made' behind a fade out, but you might in this instance experiment with Move (not MoveWorld since a rowboat has orientation) and allow the player to see the boat make the journey in real time. Link to comment Share on other sites More sharing options...
Eluwil Posted July 18, 2020 Author Share Posted July 18, 2020 (edited) Yes it finally works now, that took all week! I added the following line: set timer to 0; below the section if (timer > 2) in both state == 1 and state == 3 and everything works as it should now. if (timer > 2) Position, 61356, 184369, 2, 11, FadeIn, 2 set timer to 0 set state to 2 elseif (timer < 3) return endif I also multiplied the z-axis coordinates by sixty and then subtracted 1000 from the anwser to get the exact coordinates I want it to be at.(this is only a test script that's why the z-axis remains 11, it works in the actual script though.) Interesting idea with the Move function, it wouldn't work in this instance though because the rowboat is hanging in the air from ropes and the boat would start floating through the air, I will definitely keep it in mind! Edited July 18, 2020 by Eluwil Link to comment Share on other sites More sharing options...
Recommended Posts