BeNjO Posted June 22, 2012 Author Share Posted June 22, 2012 iv been looking and changing values to do with the npc movement and nothing seems to be hitting the spot. I am wanting the npcs to move around like a normal player, without the pauses every move, once i can do this i can then look into making them pause after X moves (to rest). The only thing i can achieve is helping npcs teleport from tile to tile but not actually move fluidly a few tiles, then stop then repeat.Anyone have any ideas where to look?Im sat in hospital with a Dongle (curse these things) and my partners laptop so bear with me if i double post and/or delay in posting. Im enjoying it in here as i can sit and fiddle with the codes all day and night without any nagging :D Link to comment Share on other sites More sharing options...
erkro1 Posted June 23, 2012 Share Posted June 23, 2012 In **modServerLoop**, in **Private Sub UpdateMapLogic** there you have:```i = Int(Rnd * 5)```Changing it to i = Int(Rnd * 3) might speed it up, or just entirely remove the select case to clean it up. Link to comment Share on other sites More sharing options...
BeNjO Posted June 23, 2012 Author Share Posted June 23, 2012 Hi there thanks for your reply, i changed it to 3, then to 2 then i = 0 then removed it along with the select case, the npcs just seem to move from one tile to the next quicker, they still pause every move. Or when i delete the whole select case they walk about aimlessly, i can hit them and they will not walk after me. Any idea? :embarrassed: Link to comment Share on other sites More sharing options...
erkro1 Posted June 23, 2012 Share Posted June 23, 2012 @TehDoug:> Hi there thanks for your reply, i changed it to 3, then to 2 then i = 0 then removed it along with the select case, the npcs just seem to move from one tile to the next quicker, they still pause every move. Or when i delete the whole select case they walk about aimlessly, i can hit them and they will not walk after me. Any idea? :embarrassed:You have probably removed too much, make sure you've only removed the case and not more, else you remove the AI pathfinding. Link to comment Share on other sites More sharing options...
Stein Posted June 23, 2012 Share Posted June 23, 2012 The problem isn't that simple to fix sadly, it was designed like this from the ground up and will need some extensive rewriting to get it to work otherwise in a proper way. You can speed it up, but that will just cause some odd behaviour or eat away at the server cycles more than it would need to(unless you do what Erwin said, but this may make it a little tough to get up to an NPC and melee them).It can be done, but you can't just start cutting stuff out at random. Read into what all the cases do properly, and fiddle with them. Or write your own pathfinding mechanic to make them move around a bit more smoothly. Link to comment Share on other sites More sharing options...
Justn Posted June 23, 2012 Share Posted June 23, 2012 Well a quick fix (somewhat) would be to change the " i = Int(Rnd * 5) " like erwin said in sub Updatemaplogic to" i = 0 " and also in the server loop find this " tmr500 = GetTickCount + 500 " and change the "+ 500" to something lower.. They will still have a slight pause but this is an improvement and will make u npcs move more like a player =/ wish someone would rewrite the ai one of these days Link to comment Share on other sites More sharing options...
Maslina Posted February 16, 2013 Share Posted February 16, 2013 I aslo need a help.I'm looking for source but i can't find it.Please Help! - I want to make that npc always attack you and follow you .So i need the source code, and please give me the source that opens some form when NPC attack you ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png) TY Please help! Link to comment Share on other sites More sharing options...
boyesjs03 Posted February 16, 2013 Share Posted February 16, 2013 Maslina, learn how to do stuff by reading through the forums. I dont know how many times ive had to say this but you need Visual Basic 6 to edit the source code.+ Topic should get locked? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now