Changing the antlion attack to always pounce

Grab your favourite IDE and tinker with the innards of game engines

Changing the antlion attack to always pounce

Postby dennisdc on Mon May 28, 2007 6:35 am

How do I codewise change the attacks of the antlion to always use the ACT_POUNCE animation instead of the ACT_MELEE_ATTACK1 animations ?

Bear in mind, that I do not have access to the QC file, so it has to be changed in the code.
dennisdc
Member
Member
 
Joined: Thu May 17, 2007 10:44 am

Postby ChopperDave on Mon May 28, 2007 3:42 pm

Check the antlions AI file. Look through its tasks and schedules and see where it uses ACT_MELEE_ATTACK1.

If you don't find it, then the base class is probably handling the melee attack, which means you're probably going to need to put a special case in the TranslateActivity() function.

I've had limited experience with AI so I could be completely wrong. Longshanks, any ideas?
User avatar
ChopperDave
Rockstar San Diego
 
Joined: Wed Feb 21, 2007 6:06 pm

Postby zombie@computer on Mon May 28, 2007 6:25 pm

around 752 of npc_antlion.cpp, i guess removing those
Code: Select all
if ( pEvent->event == AE_ANTLION_MELEE_HIT1 )
if ( pEvent->event == AE_ANTLION_MELEE_HIT2 )
lines and put them in the one below
if ( pEvent->event == AE_ANTLION_MELEE_POUNCE || pEvent->event == AE_ANTLION_MELEE_HIT2 || pEvent->event == AE_ANTLION_MELEE_HIT1)

etc
When you are up to your neck in shit, keep your head up high
zombie@computer
Forum Goer Elite™
Forum Goer Elite™
 
Joined: Fri Dec 31, 2004 5:58 pm
Location: Lent, Netherlands

Return to Programming

Who is online

Users browsing this forum: No registered users