Closed Russell2023 closed 10 months ago
In file Assets/_FD/Script/SmartEnemy/SmartEnemyGrounded.cs:219
as followed :
//CHECK AND CALL MINION IF THIS ENEMY HAS SCRIPT CALLMINION
switch (attackType) {
case ATTACKTYPE.RANGE:
if (rangeAttack.AllowAction())
its checking for enemy atack type, check enemy prefab for Attack type component (range attack type)
but the code in cs:219 is in this format:
if (meleeAttack.AllowAction()) { if (meleeAttack.CheckPlayer(isFacingRight())) { SetEnemyState(ENEMYSTATE.ATTACK); meleeAttack.Action(); AnimSetTrigger("melee"); SetSkeletonAnimation(ANIMATION_STATE.ATTACK, true); }
are you talking about the Throw Attack script?
Yes I know, the error (NullReferenceException
) referes to the attack type component
ok I checked the script. should I change something?
everything looks fine except the death sound which is missing.
@Russell2023 any results ?
No results till now. I've tried several methods and none of them seem to work. Here is a picture of that cursed event.
![Uploading fortress-defense - Playing atlas Test - PC, Mac & Linux Standalone - Unity 2020.2.5f1 Personal DX11 1_13_2024 12_23_52 PM.png…]()
One of the enemies called pirate boar has several errors after its death.
Error1: '[ Enemy ] PirateBoar - Range(Clone)' AnimationEvent 'SetHead' on animation 'Death' has no receiver! Are you missing a component?
Error2: NullReferenceException: Object reference not set to an instance of an object SmartEnemyGrounded.CheckAttack () (at Assets/_FD/Script/SmartEnemy/SmartEnemyGrounded.cs:219) SmartEnemyGrounded.LateUpdate () (at Assets/_FD/Script/SmartEnemy/SmartEnemyGrounded.cs:146)