playMaker

Author Topic: [SOLVED]cant duplicate enemy dummy  (Read 687 times)

Dustiwi

  • Playmaker Newbie
  • *
  • Posts: 26
[SOLVED]cant duplicate enemy dummy
« on: October 18, 2021, 06:24:31 PM »
hi, its me again, i made a dummy enemy and it works fine except for one thing, if i make a copy of it and try to interact with it, it interacts with the original, and after the original one dies, the copy does nothing, is it a problem with the colliders? its like the original fsm is working through the copies.
thx in advance
« Last Edit: October 19, 2021, 01:49:36 PM by Dustiwi »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: cant duplicate enemy dummy
« Reply #1 on: October 19, 2021, 11:34:51 AM »
Hi.
Its probably reference issue, as your copy is targeting the original.
can you show the fsm setup

Dustiwi

  • Playmaker Newbie
  • *
  • Posts: 26
Re: cant duplicate enemy dummy
« Reply #2 on: October 19, 2021, 12:18:19 PM »
i have attached an image, im using an fsm on the sprite to use the attack animation to activate the collider (dont know if thats the right way, most of the time i just improvise if i cant find a tutorial) which activates the taking damage bool on the enemy

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: cant duplicate enemy dummy
« Reply #3 on: October 19, 2021, 12:37:23 PM »
Can you show the actions from Set Enemy Bool and normalDamage.


probably the issue lies on the sprite fsm, as its probably targeting directly to the enemy object.

on the trigger event you can store what you hit.
use a variable there, then use it on the actions in the 'Set Enemy Bool' states.

This way you should be able to target the correct object.

Dustiwi

  • Playmaker Newbie
  • *
  • Posts: 26
Re: cant duplicate enemy dummy
« Reply #4 on: October 19, 2021, 01:49:17 PM »
thank you so much sensei, thats what i was missing, stored the hit on the trigger then instead of the game object i used the variable to trigger the bool, works nicely :D