Duke4.net Forums: Repeating death animation - Duke4.net Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Repeating death animation

User is offline   11bush 

#1

// Edit - I figured it out, i had to add another dying state for it.

First off sorry to be asking so many questions lately, I have had a lot of time to mess around with this stuff.

I created an alternate death animation for an enemy, and I am trying to give it a chence to happen with every kill.

I made the action

action APIGSHOTGUN 3592 5 1 1 15

and I created the ai

ai AIPIGSHOTGUN APIGSHOTGUN PIGSTOPPED faceplayer

Then I added it to the checkpighitstate section in the con file as

state checkpighitstate
spawn BLOOD
ifdead
{
ifspritepal 10 { endofgame 52 state standard_jibs killit break }
state random_wall_jibs
ifwasweapon SHRINKSPARK { }

addkills 1
ifwasweapon RADIUSEXPLOSION { sound SQUISHED state standard_jibs state delete_enemy }
else ifwasweapon RPG { sound SQUISHED state standard_jibs state delete_enemy killit }
ai AIPIGDYING sound PIG_DYING
ifrnd 43
ai AIPIGSHOTGUN sound PIG_DYING
}
else
{

sound PIG_PAIN
state random_wall_jibs
}
ends

I know it probably isn't the normal way of doing that, but it seems to have worked where about 1 in 4 times it uses the alternate death animation, but when it does it just keeps repeating the animation indefinitely.



This post has been edited by 11bush: 01 April 2020 - 04:20 PM

0

User is offline   Kyanos 

#2

try changing
ai AIPIGDYING sound PIG_DYING
ifrnd 43
ai AIPIGSHOTGUN sound PIG_DYING

to

ifrnd 43
ai AIPIGSHOTGUN sound PIG_DYING
else
ai AIPIGDYING sound PIG_DYING

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options