Announcement

Collapse
No announcement yet.

Enemy Pawn Weapon Switching

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Enemy Pawn Weapon Switching

    A tad bit stuck guys i am trying to allow the enemy to change between weapons when in its Attack state but i'm not sure how to do this at first i was thinking a timer but that is too predictable any suggestions would be incredibly help full

    #2
    I guess just like regular pawns you can just switch the weapons in their inventory with the change/switch weapon command and the index.

    They should probably change weapons based on occasion? How close they are to the player so proximity /range also if they are out of ammo. Which is usually not the case since most enemies have infinite ammo.

    Comment


      #3
      How do i use setCurrentWeapon() i know i need to check what weapon the enemy is using and if different then deactivate that weapon and change to the next weapon i am just unsure of how to go about this process would someone be able to do a quick example of how this function is used please

      Comment


        #4
        What have i written wrong here

        Code:
        	simulated function ClientWeaponSet (Spell_Weapon NewWeapon)
        	{
        		If (distanceToPlayer > LongattackDistance)
        		{
        		(Spell_Weapon FireballWeapon, true, false);
        		}
        		else if (distanceToPlayer <= MidattackDistance)
        		{
        		(Spell_Weapon BlizzardWeapon, true, false);
        		}
        		else (distanceToPlayer < ShortattackDistance)
        		{
        		(Spell_Weapon TornadoWeapon, true, false);
        		}
        	}
        error is missing or bad expression in parenthesis

        Comment


          #5
          Sorry for the bump up is there a easier way to do this for some reason this code won't work keeps coming up with the above error

          Comment

          Working...
          X