Jump to content

How to properly move a player to another cell/location?


Guerlot

Recommended Posts

Hi guys,

 

I have the feeling I'm missing something really simple but I can't get this to work...

I'm simply trying to move the player to another exterior cell location in a script.

 

I thought a simple Game.GetPlayer().MoveTo(MapMarkerProperty) would have done the trick but not at all, while there are no compile errors, in-game it won't work.

 

I tried replacing Game.GetPlayer() by akCaster (since it's a script in an Effect), same thing.

I tried creating an Actor Property with Player as value, PlayerProperty.Moveto(MapMarkerProperty) but I'm getting compile error saying MoveTo is not a valid function....

 

Not sure if it's the way I set the Marker property, but I doubt it.

 

ObjectReference Property MapMarkerProperty Auto Const

I tried with and without const, same thing. Yes, I did set the Property with the wanted MapMarker (in this case, for testing, I used the Vault111Ext MapMarker)

 

I also tried placing an Xmarker and using this as the Object Reference, still no go.

 

I know the problem is not with the rest of script itself because the Rest is working perfectly. The portions before and After I'm trying to move the player are working as intended

 

I'm at lost here. Any ideas?

Link to comment
Share on other sites

Not going to put the entire script but at least the Function itself in which it's being called.

Function blackout(actor akTarget, actor akCaster)
Utility.Wait(1)
GRS_DrunkMsg04.Show()
Utility.Wait(5)
Game.GetPlayer().SetEssential(true)
Game.GetPlayer().Kill()
Utility.Wait(5)
Game.GetPlayer().MoveTo(MapmarkerRef)
Game.GetPlayer().SetEssential(False)
Game.ShakeCamera(afStrength = 1.0, afDuration = 1.0)
Game.GetPlayer().AddSpell(GRS_Hangover, false)
EndFunction
So this function is being called properly in game as everything before and after the MoveTo is working The message will show up, the player would fall after 5 seconds, the camera will shake and the Hangover spell is being applied. But the Player would not move to Vault111Ext (which is where the MapMarkerRef property is pointing to (Object Reference on the MapMarker)
I'm working on a Script Effect where the player would pass out after drinking too much alcohol. It's still WIP (like missing Fade to black, etc..) but the essential is there.
Edited by Guerlot
Link to comment
Share on other sites

I actually just found the culprit:

It didn't like the Game.GetPlayer().Kill(), even if the player is still alive, being Set to Essential. Which is odd because it works fine on an NPC

I removed that part and it worked.

Now I need to find a way to show the player passing out, hopefully in the huge list of Idles :tongue:

 

EDIT: Actually, moving the Game.GetPlayer().SetEssential(False) before moving the player also works.

So I just need a Fade to black in there and I'm all set :smile:

Edited by Guerlot
Link to comment
Share on other sites

@guerlot,

awesome ideas! and nesting onEvent conditionals etc,

that'd be great, reminds me of GTA etc.

(do they get mugged upon waking up?)

 

imagine, afflictions and 'halucination'

(so, you target things which aren't really there... thus wasting munitions or potentially agro'ing folks).

 

yup, you've pretty much cracked how any-door-to-any-where and elevator-doors work.

once it travels past a point, it fades then does that, etc.

you can do that to transit to a new-lands via an event too,

perfect for "2D-3D chem induced flatland" or,

a quick and easy way to teleport to the Memory Den Virtual Holodeck etc.

 

I also recommend checking out some of RuadHan2300's ideas on that.

JetSteele also has some neat teleport ideas...

and, also check in with SMB92, and how they've set some spawnpoint nodes nested within a 'quicktime onEvent" style thing,

War of the Commonwealth v2,0 has a lot of awesome ideas and approaches in there.

 

 

 

or of course,

flashbacks to pre-war,

and "the Theta-Tan" holographic teleporter realm etc...

 

-----

the TARDIS mod project though,

I'm still trying to wrap my head around how

they got the doorportal-decal to play an animation keyed to the player location relative to viewing angle...

that is some new-school-old-school right there, 2D-3D which is fairly convincing, one step away from prebatching that and having pre-vis in 'real time' hehe.

and, to get that animation to match the interior 'desktop' when you change the interior map (which fades to white and down from white, while changing a new-lands interior...)

dang though, that is awesome!

 

it's also a 'flyable vehicle'

 

it's fairly hilarious that, you can enter the Memory Den Memory Lounger Virtual Holodeck...

and via any-door-to-any-where,

exit via the TARDIS interior settlement room (which is essentially a blank new lands...).

try explaining that continuity what-the?! error.

that, and how do you retain what you 'earned' from the virtual holodeck,

when you exit via the TARDIS or a door portal?

 

 

Link to comment
Share on other sites

 

imagine, afflictions and 'halucination'

(so, you target things which aren't really there... thus wasting munitions or potentially agro'ing folks).

Time to find someone to got make a pink elephant in 3DS Max! LOL

Edited by Guerlot
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...