Jump to content

Looking for Script( Player -> Follow Npc)


sorina123

Recommended Posts

Posted

I am somewhat new to Modding and im Searching for a method to make the Player Character  Follow an Npc entirely or at least to follow him if the Npc has moved to far away.

Posted

ThomThoms work on PlayerSlave and Ichabods PlayerSlaveEncounters has some good examples of what you are looking for.

Just be careful of permanently loosing control of the player (reload save, etc.).

Posted

Thanks for the fast Reply. I've been looking for Hours in the PlayerSlaveEncounters mod for this Purpose.. Ive found much useful stuff, but i cant find how the Modder made the Pc Follow the Slaver when theres some Distance between them -.-^^

Posted

Are you talking about running to catch up? IchSlaveAnchor script, near the bottom.

Or moving the player when slaver is too far ahead/gone through a door? Look for variable DistAlert first in IchSlaveTaderScript then in IchPlayerSlaveQuestScript.

 

Be sure to thank Ichabod for what you learn ;)

 

Mem

Posted

Actually i wanted to write a pm, but it seems to be deactivated or i just dont find the button.. *laugh*, Yes, the DistAlert Variable, thats what i found too, but that leads me to the IchPlayerSlaveQuestScript, and in that script i can only find the Player.Moveto command under the DistAlert IF condition, and thats not what im looking for since it just teleports the player, what i am looking for is, the moment when the Player has a specific distance to its owner, he automatically turns around and follows the Owner - And how exactly is this set up? Its like -> Player has a Distance between him and the Owner -> Player controls get disabled - Player acts like an Npc and runs back to his Owner until a Specified Distance is reached - Player gains Controls again

 

 

I already spend hours just to try different things and at the moment i am tired of searching and reading others Scripts over and over again just to figure it after so much time : /

 

 

edit: Maybe i am Dumb but, Ive looked over IchSlaveAnchor again - Under the DistAlert Part we have various Conditions based on the Distance between the Player and the Owner, however maybe i am Blind or not but i cant see the point where the player gets the Command to follow

 

 

editedit: lol, i think i just found it, i guess Tapcontrol was what i was looking for, he just disables/enables Controls based upon Distance and uses, for example Tapcontrol to make him follow, thanks dude for the hint^^

  • 2 weeks later...
Posted

There's also this if you're still looking for inspiration.

 

I haven't used the mod, so I can't really help you beyond simply pointing you towards it, and it looks like you've already figured out what you needed, but more choices can't hurt.

Posted

You just want to keep in mind how much control you want to take from the pc. You do not need to 'disable' controls unless you want a 'total slave' situation.

checking every 1 sec. in gamemode to see if player is facing the right direction and within the right distance can simulate an autopilot to follow the npc. Using tapcontrol to start autowalking or running (to catch up) and then when within the right range, or about to bump into the npc,  just tapcontrol 1 to stop etc.

The player then can either actively follow or kickback and let the script keep them in step.

Also keep in mind there may be differences in walk speed of npc and player.  If you are working with an npc that you (as the modder) adds then you can check within your script and adjust to match them.

Mem

 

ps: if you have not read ThisPost in general techsupport, postnumbers 15 and 16 may help.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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