carlos420ser
New Member
Posts: 7
Hello, I have the asset of the pool. and i used the spawn and it works but. I have not been able to
Posts: 7
|
Post by carlos420ser on Jun 1, 2022 5:12:49 GMT
My enemy has my own kill script but I don't know how to put it together to work with the killiable script to put it back in the pool. my script has events that it can trigger when i die but i don't know how to get them back to the pool. in the last image it is seen how npc 1 is dead but he did not appear again, he disappeared and did not restart to his original state.
|
|
|
Post by DarkTonic Dev on Jun 1, 2022 14:21:15 GMT
Since the Killable won't die on its own due to you not having turned on 3D or 2D physics (is that a mistake?), you would need to call the DestroyKillable method on the Killable script.
-Brian
|
|
carlos420ser
New Member
Posts: 7
Hello, I have the asset of the pool. and i used the spawn and it works but. I have not been able to
Posts: 7
|
Post by carlos420ser on Jun 1, 2022 20:17:09 GMT
I just uploaded an image, it is the one below, can the DestroyKillable be activated with an event like the one in the images?
|
|
|
Post by DarkTonic Dev on Jun 1, 2022 20:24:22 GMT
You could try "StartDeathTimer" with a 0. Not sure why our public method DestroyKillable is not in the dropdown list.
|
|
carlos420ser
New Member
Posts: 7
Hello, I have the asset of the pool. and i used the spawn and it works but. I have not been able to
Posts: 7
|
Post by carlos420ser on Jun 1, 2022 20:49:22 GMT
I'm trying to spawn enemies after I kill them but they don't respawn anymore.
|
|
carlos420ser
New Member
Posts: 7
Hello, I have the asset of the pool. and i used the spawn and it works but. I have not been able to
Posts: 7
|
Post by carlos420ser on Jun 1, 2022 20:51:06 GMT
Do I need to do something else to reset them to their original state, to use them again?
|
|
|
Post by DarkTonic Dev on Jun 1, 2022 20:52:54 GMT
You shouldn't. They should be reset automatically when they spawn next time.
|
|
carlos420ser
New Member
Posts: 7
Hello, I have the asset of the pool. and i used the spawn and it works but. I have not been able to
Posts: 7
|
Post by carlos420ser on Jun 1, 2022 21:04:10 GMT
maybe I did something wrong.
what I did was put the killiable script on my enemy game object. should i configure it???'
|
|
|
Post by DarkTonic Dev on Jun 1, 2022 22:01:14 GMT
Yes, it goes on the enemy if you want to "Kill" it to use some Killable features. What features of Killable to you want to use?
|
|
carlos420ser
New Member
Posts: 7
Hello, I have the asset of the pool. and i used the spawn and it works but. I have not been able to
Posts: 7
|
Post by carlos420ser on Jun 1, 2022 22:37:17 GMT
I have not been able to restart my enemies, if they die, but when they respawn they do not restart, they reappear with errors. When my enemies die, they drop a rag doll, which detaches from the game object. I think that's what affects respawning. Do you have any idea what I can do? it would be very helpful
|
|
|
Post by DarkTonic Dev on Jun 1, 2022 23:54:10 GMT
I assume by "restart" you mean some type of behavior that isn't part of Core GameKit. Probably part of your AI plugin or whatever that 3rd screen shot is.
Most likely it has state initialization code that only runs in Start and/or Awake, which wouldn't fire when things are respawned. So you'd need to contact the author of that plugin and ask them how to retrofit it. Normally it means moving all code from OnStart into OnSpawned, which is a method Core GameKit calls after spawning things.
You didn't really answer my question though. What feature(s) of Killable are you wanting to use? Prefab replacement, damage prefab, world variables, knockback etc.
-Brian
|
|
carlos420ser
New Member
Posts: 7
Hello, I have the asset of the pool. and i used the spawn and it works but. I have not been able to
Posts: 7
|
Post by carlos420ser on Jun 2, 2022 0:45:45 GMT
I mean reset the enemy to its initial value. really the only thing I want is to mark the enemy as dead and reset to its initial value so that it works with the pool and can be used again in the next wave.
|
|
|
Post by DarkTonic Dev on Jun 2, 2022 2:14:27 GMT
Everything in Killable (hit points, etc) is reset automatically each time you spawn it from Pool Boss. If you're talking about something outside of Killable, then what I said in the last post is what you need to do in OnSpawned.
|
|