Jump to content

Looking for Script( Player -> Follow Npc)


sorina123

Recommended Posts

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

Link to comment

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^^

Link to comment
  • 2 weeks later...

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.

Link to comment

Archived

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

  • Recently Browsing   0 members

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use