Transforming Enemies & Randomize Followanim Questions

Aerisetta

Active member
Hi all, I am thinking of making a system in my game and want to get some advice before I begin, remembering that I am quite an amateur at coding.

Problem 1:
  1. There are normal AI enemies (i.e. Swordsman)
  2. I want the player to be able to cast a spell on the enemies (i.e. Zombify Spell)
    The normal enemy, after being hit by the Zombify Spell, has a 25% chance of turning into a Zombie.
  3. As a Zombie, the enemy will have a whole different set of animations.
  4. I would like there also to be a cure for zombification OR after X time, the zombie will return to normal form (back to Swordsman)
My approach:
  1. Right now, my plan is to make Zombie a weapon type
  2. The player's zombification spell is an area based item that the enemy will pick up when they come in contact with it
  3. The item switches the Swordsman into a Zombie_Swordsmans
  4. I'm not sure how to make them turn back into normal though.

Is this a good approach?

=================================================================

Problem 2:

1. When the enemy becomes a zombie, they will run up to the player and try to grab them
2. When the enemy successfully grabs the player, I usually use FOLLOWANIM and FOLLOWCOND to play out a grab animation
3. However, I am making many different FOLLOWANIM, and was wondering if there was a way to RANDOMIZE which FOLLOWANIM will play out.

Not sure how to make this happen.
=================================================================

Problem 3:
1. When the enemy becomes a zombie, they will only attack a certain type of player character, and ignore all others. For example, a character that has a special type of blood TYPE A.
- Priority 1: Attack PLAYER + TYPE A
- Priority 2: Attack NPC + TYPE A
- Priority 3: Attack Enemy + TYPE A
If no TYPE A entity is on screen, the zombie will standstill or wander aimlessly


I have no idea how to do this.
 
@Aerisetta,

I should have noticed this before, and I'm headed out the door for a while. I do see one quick thing before you go any further.

I wouldn't make the zombies weapons, because then you're dealing with all the native weapon behaviors, and that's not really what it looks like you want to do. They should just be their own models. Then you can switch to zombie mode (and back) at any time as follows:

C:
changentityproperty(<entity>, "model", <new model name>);

I'll try to come back with more later.

DC
 
Back
Top Bottom