Spawn movement
Moderator: Team Members
- Cynnar
- Project Leader
- Posts: 738
- Joined: Sat Sep 27, 2014 1:22 am
- EQ2Emu Server: Eq2emulator
- Characters: Vlash
Veinlash
Taragak
Cynnar
Re: Spawn movement
Try changing the + and - values maybe. From what I see here you get the npc x location add one then next movement you get the npc location minus one. Then minus one again
[ 01000011 01111001 01101110 01101110 01100001 01110010 ]
Follow on:
Twitter Facebook
Contact me:
PM Discord chat email
Hardware: the parts of a computer that can be kicked
Follow on:
Twitter Facebook
Contact me:
PM Discord chat email
Hardware: the parts of a computer that can be kicked
-
Jabantiz
- Lead Developer
- Posts: 2912
- Joined: Wed Jul 25, 2007 2:52 pm
- Location: California
Re: Spawn movement
I have never seen spawns walk backwards before, in fact I think the client takes care of the heading when a spawn walks. That said the difference in location is tiny so it may not have a chance to really rotate a spawn but that is just a guess. At most you have a difference of 2 on one axis, 10 is usually right in the face of the spawn, try bumping the +/- 1 and see if you get the same results.
-
Plague
- Posts: 68
- Joined: Mon Jun 29, 2015 3:17 pm
- EQ2Emu Server: WiP
Re: Spawn movement
Code: Select all
function spawn(NPC)
local x = GetX(NPC)
local y = GetY(NPC)
local z = GetZ(NPC)
MovementLoopAddLocation(NPC, x + 10 , y, z - 10 , 1, math.random(5, 15))
MovementLoopAddLocation(NPC, x - 10 , y, z - 10 , 1, math.random(5, 15))
MovementLoopAddLocation(NPC, x - 10 , y, z + 10 , 1, math.random(5, 15))
MovementLoopAddLocation(NPC, x + 10 , y, z + 10 , 1, math.random(5, 15))
end
function respawn(NPC)
spawn(NPC)
endNow they are moonwalking for a long ways.
This works just fine, callously borrowed from generic tiny_movement_loop.
Code: Select all
local x = GetX(NPC)
local y = GetY(NPC)
local z = GetZ(NPC)
MovementLoopAddLocation(NPC, x - 2, y, z + 4, 1, math.random(5, 15))
MovementLoopAddLocation(NPC, x + 3, y, z + 1, 1, math.random(5, 15))
MovementLoopAddLocation(NPC, x , y, z - 2, 1, math.random(5, 15))
MovementLoopAddLocation(NPC, x - 5, y, z - 1, 1, math.random(5, 15))- Cynnar
- Project Leader
- Posts: 738
- Joined: Sat Sep 27, 2014 1:22 am
- EQ2Emu Server: Eq2emulator
- Characters: Vlash
Veinlash
Taragak
Cynnar
Re: Spawn movement
So if you place the code from tiny_movement_loop in place of your code it works? Not using the tiny_movement_loop script, but changing your script.Plague wrote: Thu Feb 15, 2018 8:18 pm This works just fine, callously borrowed from generic tiny_movement_loop.
Is there a reason you are not wanting to use tiny_movement_loop script?
[ 01000011 01111001 01101110 01101110 01100001 01110010 ]
Follow on:
Twitter Facebook
Contact me:
PM Discord chat email
Hardware: the parts of a computer that can be kicked
Follow on:
Twitter Facebook
Contact me:
PM Discord chat email
Hardware: the parts of a computer that can be kicked
-
Plague
- Posts: 68
- Joined: Mon Jun 29, 2015 3:17 pm
- EQ2Emu Server: WiP
Re: Spawn movement
No reason, it was just a learning process.
I plan on making a moonwalking bear later tho.
I plan on making a moonwalking bear later tho.
- Cynnar
- Project Leader
- Posts: 738
- Joined: Sat Sep 27, 2014 1:22 am
- EQ2Emu Server: Eq2emulator
- Characters: Vlash
Veinlash
Taragak
Cynnar
Re: Spawn movement
Ah ok. I don't know why it's happening tbh.
[ 01000011 01111001 01101110 01101110 01100001 01110010 ]
Follow on:
Twitter Facebook
Contact me:
PM Discord chat email
Hardware: the parts of a computer that can be kicked
Follow on:
Twitter Facebook
Contact me:
PM Discord chat email
Hardware: the parts of a computer that can be kicked
- Ememjr
- Team Member
- Posts: 975
- Joined: Wed Mar 15, 2017 9:41 am
- EQ2Emu Server: Perseverance
Re: Spawn movement
if they are truly walking backwards then it could have to do with the spawn it self not knowing what is front and what is back, kinda like when it client gets 0 heading and 180 heading mixed up
Who is online
Users browsing this forum: No registered users and 0 guests