traveler
2010-11-05 22:16:59
when i do GetNPCs, all the animations for the found npc's are -1. Ive watched the npcs in the area around my character, and some are standing still, while others are moving.
Does this -1 for all the animations mean the hook isnt updated? or that im not doing something right?
Method
2010-11-05 22:28:00
The field that is hooked is an "extra" animation, if you will. When characters are standing, walking, running, and turning, they still animate, but the field(s) for that aren't in the include. The field we have hooked accounts for other animations like attacking, defending, performing an emote, etc.
mormonman
2010-11-05 22:28:43
From: traveler
when i do GetNPCs, all the animations for the found npc's are -1. Ive watched the npcs in the area around my character, and some are standing still, while others are moving.
Does this -1 for all the animations mean the hook isnt updated? or that im not doing something right?
Just because they are moving doesn't mean they are animating. Animations are like when they are in a fight.
Cstrike
2010-11-05 22:34:37
From: traveler
when i do GetNPCs, all the animations for the found npc's are -1. Ive watched the npcs in the area around my character, and some are standing still, while others are moving.
Does this -1 for all the animations mean the hook isnt updated? or that im not doing something right?
Are you trying to find when the NPC is not moving?
traveler
2010-11-05 22:42:17
From: cstrike
Are you trying to find when the NPC is not moving?
yes, that is what im trying to do.
Cstrike
2010-11-05 22:49:45
From: traveler
yes, that is what im trying to do.
The way I'd do it is:
1) Get NPC position
2) Wait a few hundred milliseconds
3) Check tile again
if moved, repeat until the old tile = new tile (then you know it stopped)
4) continue
It will need a few failsafes. A trick I use is try
for i:= 1 to 3 do…
and if you fail 3x to get the NPC with failsafes, then nuke the character.
traveler
2010-11-05 23:01:05
thanks cstrike, ill try that tomorrow. the only problem I see with that is trying to find the positions of 3+ NPC's. which im trying to do in one of the spots.
Cstrike
2010-11-05 23:10:12
From: traveler
thanks cstrike, ill try that tomorrow. the only problem I see with that is trying to find the positions of 3+ NPC's. which im trying to do in one of the spots.
What location is it? xD
Sounds like a lot to coordinate with 3. That'd be tough for most scripting in general TBH. One is doable, two would suck, three is just "omfg".
traveler
2010-11-05 23:13:54
well i could track one of the guys, i guess. its just trying to find a monk so i can travel to the island of entrana.
Cstrike
2010-11-05 23:37:32
From: traveler
well i could track one of the guys, i guess. its just trying to find a monk so i can travel to the island of entrana.
Ah thats not too bad, just keep grabbing the tile and as soon as the mouse lands on him, check uptext for "Monk" and right click, then use R_ChooseOptionMulti ([string here]); and problem solved :D
Gu3st...
2010-11-06 10:09:12
Why is there a difference between one and two, cstrike?
Just get the tile location of each of them and save it to an array, then wait a few hundred milliseconds and check them again
Cstrike
2010-11-06 12:49:09
From: Zyt3x
Why is there a difference between one and two, cstrike?
Just get the tile location of each of them and save it to an array, then wait a few hundred milliseconds and check them again
Difference between 1 and 2 which? :)
traveler:
My recommendation is just keep getting the tile and moving the mouse there, then use R_GetUpTextMulti or R_IsUpTextMulti (forget which one it is), and look up the string 'onk'. Then it's easy from there on in :)
If it fails just put it in a repeat look for at max 8-10 seconds
Gu3st...
2010-11-06 13:13:51
From: cstrike
Difference between 1 and 2 which? :)
I dunno..
You said "One is doable, two would suck, three is just "omfg".".
Cstrike
2010-11-06 13:16:20
From: Zyt3x
I dunno..
You said "One is doable, two would suck, three is just "omfg".".
Ah that, yeah if you had to trace two different NPC's, that would suck. Tracing three would be hell. Though I think as you said with an array thats feasible for sure. As long as it's not those nutty NPCs like in Prison Bob then all is good :)
Some NPCs seem to be always moving, tracking one IMO is the easiest. Two is doable (had to do it for one random), three would be hell.