weird problem with NPC movement.
Hi everyone.
I am working with a smart NPC, this, can move, attack, follow player, etc. Generally, i test my plugins in CS 1.6 new game option (not a host server, or dedicated), and npc plugin works good, but when i upload and test my npc plugin in a hosted or dedicated server, i have the next problem: in cs 1.6 game (new game option), when i create the NPC, it follow me with run animation, and when distance between the entity and me, are near (distance: 60.0 example), this attack me. works ok... but: if i create the entity in a host or dedicated server (with no other plugins, updated server), the entity follow me, but the model of entity is in the respawn ent origin, and play run sequence, but how i said, the entity follow me, but the model no. after, when the entity is close to me, the npc attack me and the attack sequence and model works good, (the model appears close to my and play attack sequence, effects, etc). basically, the problem is that the entity follow me, but the model not (how i check this ? with a BEAMENTPOINT between entity and i, and when i shoot to the entity, this bloods). check this image:
Spoiler
the boomer model, is in the respawn entity site, but you can see that the entity, is more close to my (i make TE_BEAMENTPOINT [red line] to check the current origin of entity). now, i stop walk and when the entity is close to my, this attack me, a little screenfade effect, etc.
Spoiler
ending explication of the problem, here is my code (credits to dias for him npc's plugins). PHP Code:
PHP Code:
Spoiler
if i edit the entity think time (0.1 to 1.0), the sequence play correctly, but the entity run bad, not realistic. i try a lot things, make a fix with variable, with task, edit framerate and animtime, use other stocks, and more, but i don't get good results, sorry for the long explication, and any question only ask me. PD: i use engine and fakemeta, later i will edit the plugin, now i'm testing because i get weird errors... Best regards, and sorry for my bad and basic english. |
Re: weird problem with NPC movement.
movetype MOVETYPE_PUSHSTEP ?
|
Re: weird problem with NPC movement.
Quote:
PD: mm works perfectly, but what is the difference between STEP and PUSHSTEP ? i don't work usually with entities, but now i wanna learn about this xD |
Re: weird problem with NPC movement.
Code:
#define MOVETYPE_STEP 4 /* gravity, special edge handling -- monsters use this */ |
Re: weird problem with NPC movement.
Quote:
solved :L |
| All times are GMT -4. The time now is 15:52. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.