• Welcome to Freedom Reborn Archive.
 

Lunarman's Help thread

Started by Lunarman, February 25, 2007, 12:28:08 PM

Previous topic - Next topic

Lunarman

Ok, a new mission and new woes ;)

Firstly: Has anyone ever used the ffxfx.py file before. Just so you know it lets you attach FX to bips of your chars like fire to their hands or something similar. I used this to add fx to mangrapes minions when they were hero files and it worked in the rumble room and in missions. However since I added them to the .dat file it's stopped working.

Here's what I've got

FFX_CUSTOM_FX=[
['mg_drunkard_male','effect_ffx_drunken_haze','','Bip01 Head',],
['mg_drunken_cop','effect_ffx_drunken_haze','','Bip01 Head',],
['drunkard_female','effect_ffx_drunken_haze','','Bip01 Head',],
]


Yes the names are correct, both of the characters and the effects (in the resources tab, right?).
What am I doing wrong? Or does it just not work with built in chars.

And: Is there a way to assign a group of enemies a kill goal to kill a group of enemies?

At the moment I've got

def coppubattack():
for pubcops in pubcops_list:
AI_SetEnabled(pubcops, 1)
addKillGoal(pubcops, 'innocent2', priority = ai.goal.PRI_ZERO-1)
regDeath(pubcops,'On_drunkcop_KO')
Objective_Add('saveinnocents', 'Stop the drunken cops before they kill any civilians', 1, 100)
regDeath('innocent1','On_innocent_killed')
regDeath('innocent2','On_innocent_killed')
regDeath('innocent3','On_innocent_killed')
regDeath('innocent4','On_innocent_killed')
regDeath('innocent5','On_innocent_killed')
regDeath('innocent6','On_innocent_killed')
Mission_SetAttr('cops_killed', 0)


But I'd rather that instead of just attacking 'innocent2' the cops attacked all the people in this list, and chose their targets like they normally do
copsinnocents_list=('innocent1','innocent2','innocent3','innocent4','innocent5','innocent6',)

Is there any way to do that?

Thanks

Lunarman

catwhowalksbyhimself

You should just be able to add the kill goal to all of them at once.

The engine can handle multiple kill goals at once, and since they would all be set to the same level, they should pick their targets pretty much normally.

stumpy

Yeah. addKillGoal() is supposed to handle a tuple of object names as the target. In addition, you could put your regDeath()s for the innocents in loop, just for tidiness. E.g.

def coppubattack():
for pubcops in pubcops_list:
AI_SetEnabled(pubcops, 1)
addKillGoal(pubcops, copsinnocents_list, priority = ai.goal.PRI_ZERO-1)
regDeath(pubcops,'On_drunkcop_KO')
Objective_Add('saveinnocents', 'Stop the drunken cops before they kill any civilians', 1, 100)
for innocent in copsinnocents_list:
regDeath(innocent,'On_innocent_killed')
Mission_SetAttr('cops_killed', 0)

Epimethee

Quote from: Lunarman on August 28, 2007, 07:27:38 AMFirstly: Has anyone ever used the ffxfx.py file before. Just so you know it lets you attach FX to bips of your chars like fire to their hands or something similar. I used this to add fx to mangrapes minions when they were hero files and it worked in the rumble room and in missions. However since I added them to the .dat file it's stopped working.

Here's what I've got

FFX_CUSTOM_FX=[
['mg_drunkard_male','effect_ffx_drunken_haze','','Bip01 Head',],
['mg_drunken_cop','effect_ffx_drunken_haze','','Bip01 Head',],
['drunkard_female','effect_ffx_drunken_haze','','Bip01 Head',],
]


Yes the names are correct, both of the characters and the effects (in the resources tab, right?).
What am I doing wrong? Or does it just not work with built in chars.
I've just run a quick test using the built-in FFX Angel and things apparently work (apparently, because I couldn't see the FX, since "effect_crystal_charged_start" uses a NIF available only in FF1). Do you have any related error in script.log or ff.log?

Lunarman

Thanks guys.

I'll keep trying trying with those ffxfx, otherwise I can skope it onto the mesh.

Lunarman

It all looks to be working now, it was just a minor thing I've fixed now *doh*