antstubell Posted November 11, 2020 Share Posted November 11, 2020 (edited) Quite a large script but main issue from what I can tell is for some reason the player will not move. Hopefully something simple I just can't see after hours of working on this. Video shows exactly what is and isn't happening.https://onedrive.live.com/?cid=B60C11D037429D8E&id=B60C11D037429D8E%2153146&parId=B60C11D037429D8E%21191&o=OneUp imageSpaceModifier property FadeToBlackImod autoimageSpaceModifier property FadeToBlackHoldImod autoimageSpaceModifier property FadeToBlackBackImod autoActor Property PlayerREF AutoCell Property MyCell1 AutoCell Property MyCell2 AutoFloat Property Delay AutoFloat Property Delay2 AutoGlobalVariable Property MyGlobal Auto; the player is IN or OUT of the coffin variableGlobalVariable Property LiftPos AutoObjectReference Property Movhere1 AutoObjectReference Property Movhere2 AutoObjectReference Property CoffinMorgue AutoObjectReference Property CoffinHosp AutoSound property MySnd01 AutoString Property Mytext AutoString Property CellName1 AutoString Property CellName2 AutoEvent OnActivate(ObjectReference akActionRef)Cell ThisCell = PlayerREF.GetParentCell()If MyGlobal.GetValue() != 1; move coffin if player is not inside itMoveEmptyCoffin()EndIfIf ThisCell == MyCell1 && MyGlobal.GetValue() == 1; player in morgue coffin, move player to hospitalLiftPos.SetValue(1)Cell1()EndIfIf ThisCell == MyCell2 && MyGlobal.GetValue() == 1; player in hospital coffin, move player to morgueLiftPos.SetValue(2); start position of coffinCell2()EndIfEndEvent; ----------------------------------------Function Cell1(); MorgueDebug.Notification ("You’re in " + CellName1)EndFunction; ----------------------------------------Function Cell2(); Hospital UpperDebug.Notification ("You’re in " + CellName2)FadeToBlackImod.apply()MySnd01.play(Self)CoffinMorgue.Enable()PlayerREF.MoveTo(MovHere1)Utility.wait(Delay); wait for fade, sfx and other coffin to enableFadeToBlackImod.PopTo(FadeToBlackHoldImod)Utility.wait(Delay2); time in blackoutCoffinHosp.Disable()FadeToBlackHoldImod.PopTo(FadeToBlackBackImod); fade back from blackLiftPos.SetValue(1); lift now in morgueEndFunction; --------------------------------------------------------------Function MoveEmptyCoffin();Debug.Notification ("Moving Empty Coffin")If LiftPos.GetValue() == 2; lift in hospitalFadeToBlackImod.apply()MySnd01.play(Self)Utility.wait(Delay); wait for fade and sfxCoffinHosp.Disable()CoffinMorgue.Enable()FadeToBlackImod.PopTo(FadeToBlackHoldImod)Utility.wait(Delay2); time in blackoutFadeToBlackHoldImod.PopTo(FadeToBlackBackImod); fade back from blackLiftPos.SetValue(1); lift now in morgueElseIf LiftPos.GetValue() == 1; lift in morgueFadeToBlackImod.apply()MySnd01.play(Self)Utility.wait(Delay); wait for fade and sfxCoffinHosp.Enable()CoffinMorgue.Disable()FadeToBlackImod.PopTo(FadeToBlackHoldImod)Utility.wait(Delay2); time in blackoutFadeToBlackHoldImod.PopTo(FadeToBlackBackImod); fade back from blackLiftPos.SetValue(2); lift now in hospitalEndIfEndFunction Edited November 11, 2020 by antstubell Link to comment Share on other sites More sharing options...
maxarturo Posted November 12, 2020 Share Posted November 12, 2020 A) Place 2 'Load Doors' and use them to move the player, activate 1st to go down > activate 2nd to go up, you don't need to have the doors visible just the 'Door's Markers' placed where there are suppose to, and your script does the rest. MyDoor.Activate(PlayerREF) B) In order to move the player you need to script it like this: Game.FadeOutGame(False, True, 2.0, 1.0) ; No Need For imageSpaceModifier PlayerREF.MoveTo(MovHere1) Game.EnableFastTravel() Game.FastTravel(MovHere1) And for not calling GAME put in the top of your script Import Game FadeOutGame(False, True, 2.0, 1.0) PlayerREF.MoveTo(MovHere1) EnableFastTravel() FastTravel(MovHere1) Have a nice day. Link to comment Share on other sites More sharing options...
antstubell Posted November 12, 2020 Author Share Posted November 12, 2020 (edited) EnableFastTravel? I've never heard of or seen these commands before.Why doesn't the MoveTo work as it is? Edited November 12, 2020 by antstubell Link to comment Share on other sites More sharing options...
maxarturo Posted November 12, 2020 Share Posted November 12, 2020 The difference between moving an npc and moving the player from one cell to another is: - Npcs when they are moved they just occupy a point reference in the 3d space and nothing more. - While, when the player is moved the game engine needs to unload & LOAD the cell that the players will occupy, the "FastTravel" does all the necessary 'LOADING' of the cell, otherwise the player will be moved to an empty cell. * The functions i posted is what 'Load Doors' actually do. * I try to explain it as simple as i could, i hope i was clear, if i wasn't don't hesitate for further explanation. Link to comment Share on other sites More sharing options...
Evangela Posted November 12, 2020 Share Posted November 12, 2020 (edited) I feel like you are moving but you're falling back down. Keep in mind that Fast Travel advances time, while MoveTo doesn't. Just in case you care about time. Edited November 12, 2020 by Rasikko Link to comment Share on other sites More sharing options...
dafydd99 Posted November 12, 2020 Share Posted November 12, 2020 I was looking at those two functions just recently: playerRef.moveTo(ref) will move the player to the given ref in any cell or worldspace game.fastTravel(ref) will move the player to the fast travel location IN THE SAME CELL OR WORLDSPACE ONLY. It will also encourage followers to travel with you - the moveTo won't. Hence if you want to travel without using a door to a new worldspace with your followers you'll need to do first moveTo then fastTravel. I suspect what may have happened with you above is that an older version of your scripts properties might be burned into your save and 'movHere1' might not be set to the value the appears in the editor, but an older value - this has caught me more times than I'd like to say. Try a Debug.Notification("Moving to:"+movHere1.getFormId()) before you call moveTo to check which ref it's going to. Or try with an older save before you added the script to the button. Cheers - dafydd99 Link to comment Share on other sites More sharing options...
maxarturo Posted November 12, 2020 Share Posted November 12, 2020 Rasikko and dafydd99 are correct. As for using the "MoveTo()" function alone in the player, i did that only once and the game CTD, so i immediately scripted as i posted above. No further testings was than to that part of my mod with only the "MoveTo()" > player. Link to comment Share on other sites More sharing options...
antstubell Posted November 14, 2020 Author Share Posted November 14, 2020 Hang on there folks. Recently had a disc clone disaster. And you can guess it was the disc with... need I go on. Link to comment Share on other sites More sharing options...
Evangela Posted November 14, 2020 Share Posted November 14, 2020 Oh crap I'm sorry to hear that. I once did that and the drive got bricked, thankfully it was the drive being cloned to and not the main drive being cloned from. Link to comment Share on other sites More sharing options...
Recommended Posts