simsarmy Posted October 27, 2006 Share Posted October 27, 2006 There is probaly already a tutorial or sticky somewhere, but I need to quickly 'History' to this Web Page... I'm not sure how to make a NPC follow my player, in two instances.1. I simply cannot manage to make my NPC follow my Player at all...2. I am adding conditions I am not on the same computer, of the mod I am making, but the all the junk looks a bit like this... Package ID: Follow01Day, time... Etc. (None/0)Type: FollowTarget: Player refDistance: 0 I have done a few conditions, but I want it to be somthing like, if player is in [Test] cell then begin following.However, I also want it to be that:The NPC, is in a inaccessible cell, and will be teleported to the player when the player in in the said cell, and when the player leaves the said cell, then the NPC will go back to the inaccessible cell. I think the script would look a bit like. scn script Begin GameMode If Player. GetInCell [Test] cell Someguy01. moveto Player; ? Endif End Help? Link to comment Share on other sites More sharing options...
Povuholo Posted October 27, 2006 Share Posted October 27, 2006 Go to the A.I. package, to the conditions section and 'select' getinsamecell player. That way the npc will only follow if he's in the same cell as the player. You could increase the distance (which you set at 0) a bit. 100 is just one meter away or something like that. And the script...scn script Begin GameMode If Player.GetInCell TestCell Someguy01Ref.moveto Player endif if Someguy01Ref.getinsamecell player == 0 && Someguy01Ref.getincell YourInaccessibleCell == 0 someguy01Ref.moveto YourXmarkerRef Endif EndYou can't use an npc's ID in a script, you'll have to make a reference ID for him.What this does: If player gets into test cell, the npc will move to him. But if player is not in the same cell as the npc and the npc is not in his inaccessible cell, he will be moved to his inaccessible cell. You will have to place an Xmarker in the inaccessible cell and give it a reference ID (YourXmarkerRef in the script) Xmarker is in the static object section. Except for that the script is fine. Nah, I did do the script right, but it still didnt work, it would have complained at saving if I didnt have a space... Yes I removed that line, it wasn't. You did this for example: someguy01ref. moveto That has to be together: someguy01ref.movetoHey I'm quoting something in a post that was posted later than this one.. Heh. Ignore whatever was in the original post. Link to comment Share on other sites More sharing options...
simsarmy Posted October 27, 2006 Author Share Posted October 27, 2006 Except for that the script is fine. Nah, I did do the script right, but it still didnt work, it would have complained at saving if I didnt have a space... ARG don't do that, I didn't realise that you have replied, anyways, its still a prob though, I can't get an NPC to follow simply using AI... Plus I can make NPC's speak now,I had the cov quest getplayablerace set to == 0 lol EDIT: Merged your posts. Please use the edit button to add more if you need to. Thanks. - Switch Link to comment Share on other sites More sharing options...
Povuholo Posted October 27, 2006 Share Posted October 27, 2006 Alright. He still doesn't follow? Did you...Set the time and everything to -any- and 0? Yes you did, you already said that.At the conditions tab, did you choose 'getinsamecell player' == 1 (important! set to 1, don't leave it at 0 ;) )And Target: Specific Reference: PlayerRef?Add the package to the NPC :rolleyes: Add any other packages to that npc? Link to comment Share on other sites More sharing options...
simsarmy Posted October 27, 2006 Author Share Posted October 27, 2006 Hmm, not sure... I will try that later.And as long as your helping: Can you make it so that a key is set so when you enter a room it locks behind you, and unless you already had the key, it does not reopen? Somthing around scripting it so it set to open the door after you enter? Link to comment Share on other sites More sharing options...
Povuholo Posted October 27, 2006 Share Posted October 27, 2006 Hmm, not sure... I will try that later.And as long as your helping: Can you make it so that a key is set so when you enter a room it locks behind you, and unless you already had the key, it does not reopen? Somthing around scripting it so it set to open the door after you enter?Wooh I'm getting all scripty.This is something like that. What's even better is that not even using the console command 'unlock' will work. You should place this script on the door in the cell you want the player to be trapped in if they don't have the key. The script is for a teleport door though, for not a door that swings open. scn script begin onactivate if player.getitemcount YourKey <1 messagebox "This door is locked. You need the key" endif if player.getitemcount YourKey >= 1 activate endif end Edit: You don't have to put any normal lock on the door. Link to comment Share on other sites More sharing options...
simsarmy Posted October 27, 2006 Author Share Posted October 27, 2006 Thanks... And lasty I am trying to make meshes at the mo... I am using a programme called 'Blender' that has been changed to allow Nif, but I can't seem to get it working. I export the file from Blender to Nif, load up the Con, then I create a new item, and chuck in the Nif file. If you do make meshes, what do you use? Link to comment Share on other sites More sharing options...
Povuholo Posted October 27, 2006 Share Posted October 27, 2006 Thanks... And lasty I am trying to make meshes at the mo... I am using a programme called 'Blender' that has been changed to allow Nif, but I can't seem to get it working. I export the file from Blender to Nif, load up the Con, then I create a new item, and chuck in the Nif file. If you do make meshes, what do you use?Sorry, I don't know anything in that area. You can ask me anything about dialogue, quests and basic script things, but that's about all I know. ;) Good luck with your mod! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.