Jump to content
Sign in to follow this  

Script c++ make a npc reset if he can't reach the player

Recommended Posts

Hello, I would like to add to my scripts a function (that will be called in UpdateAI()), this function would make the npc reset if he didn't hit the player for the last X second (and of course the timer begins when he doesn't move).

This function would prevent player to "cheat", like if the player is flying in the air and the npc can't hit the player, the npc would reset. I think I already saw a function that work like this but I couldn't find it,

so I was wondering if someone could help me to figure it out.

Thanks for your help.

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...