|
Post by jrush64 on Nov 4, 2019 12:29:08 GMT
Hi,
How exactly can i create a tranquilizer type gun that works with the Invector ai and shooter? Can I create the gun to kill the enemy then bring that enemy back to life if the enemy is awoken or something.
I saw something like damage type, what's that for?
|
|
|
Post by Invector on Nov 4, 2019 14:11:01 GMT
There are several ways to do this... but one that pop's into my head is to actually 'kill' the enemy but uncheck the option "Remove Components After Die", and use the script EventsWithDelay to after a period of time reset the health back to the maxHealth, this way the AI will trigger the dead animation and it will standand up again once you reset the health
|
|
|
Post by jrush64 on Nov 4, 2019 14:24:24 GMT
Where do I find events with delay script?
How do I change the death animation to a sleep death one?
Edit: Nevermind found it. Called v event with delay. Will report back.
|
|
|
Post by jrush64 on Nov 4, 2019 15:07:03 GMT
I got it working but once the character is awoken, i cant put him back to sleep again because the dead variable doesnt switch back to dead when his health is 0. This after i put him to sleep once and woken him up.
|
|
|
Post by Invector on Nov 4, 2019 15:22:24 GMT
you can switch back manually by creating a simple script and calling in the event
|
|
|
Post by jrush64 on Nov 4, 2019 15:29:00 GMT
I did it with playmaker. However is there a way to change the death animation for sleep? I added a issleeping bool but the animation resets before it even reaches halfway in the animator.
|
|
|
Post by Invector on Nov 4, 2019 17:24:27 GMT
You can filter using the ActionState, if it's 0 go to the default death animation, if it's 1 go to your custom. Don't forget to also reset this variable when he awakes
|
|