News:

Rings of Reznor!

Main Menu

Need help with AI_MakeIntoHero

Started by kiapet, August 29, 2009, 05:44:25 AM

Previous topic - Next topic

kiapet

This is for Freedom Force 1 if it makes any difference.

I am trying to mod a level where Wolverine fights Deadpool to a certain health, then Deadpool joins your squad as a hero.  Deadpool is a villain.  When I use AI_MakeIntoHero, I control him but he acts strange.  None of the bad guys can hurt him.  Attacks go through him, and it doesn't show his name when I mouse over him.

Am I doing something wrong?  Is there some other command that would let me make him into a hero?  It works if I change him to hero in template tab but then he's controllable from the begining.   :banghead:

Thanks!

bearded

this is only a guess, but see if 'campaign use only' box is ticked in ffedit.  that box does odd things.  it should be ticked in most cases.

kiapet

Yes, it is ticked.  I will try unticking it just in case.  I'm not sure what it does.

kiapet

Unfortunately didn't change anything.

Does it mean anything that when I take him into danger room, he works fine?  Anyone know how it turns the first four characters selected into heroes even if there villain class?

bearded

see, i've had this problem but it was years ago, so i can't remember.  what is his ai?  you want GAmeObjectMinion not GameObjectVillian.  i remember that was important for some reason.

stumpy

One approach to that situation is to create an actual hero version of the character in FFEdit. It can be an exact copy of the baddy character except for name and AI (and you can make him appear to have the same name by using the same name in the strings.txt file). Then, when the baddy version is KOed and comes back to join the squad, use Object_Destroy() on the baddy and then spawn the hero version, who should show up on the squad and be a normal playable character, assuming there are fewer than four heroes on the squad before.
Courage is knowing it might hurt, and doing it anyway. Stupidity is the same. And that's why life is hard. - Jeremy Goldberg

kiapet

@Bearded -- tried setting to minion (was villian) but no luck.

@Stumpy -- thanks for the response.  That's my back up plan but I was trying to figure our how to do it without resorting to that.  Doesn't some of the ffx powers work liek that?  Like posession or mimic?  Shouldn't they be able to make a villian/minion into a hero?  MAybe I can borrow from that code??

kiapet

Hmm....

I brought Jericho (villain) into the mix.  He could not possess Deadpool.  100% resistance no matter what.

I made a hero version of Jericho.  He possessed Deadpool successfully -- but Deadpool still didn't work right as a hero.  Couldn't mouse over him, couldn't hurt him, etc.

When I "emerged", I lost my Jericho.  He was replaced by the villain version.  But I think that was because I forgot to run FFX Control Centre again so they shared the same complex number.

But that means stealing the ffx code probably won't work.  Looks like the game isn't going to like making villains into heroes.  And if it only lets you make cops into heroes I'll be making an awful lot of extra versions of people.  Is there a limit to how many cna be made?

bearded

in my mod, i've gotten it working perfectly.  in the morning i'll post the exact code i use.

bearded

bah.  sorry.  i meant tomorrow morning of course.

bearded

def GetMercList():
return ["vixen", "sandman", "deathstroke", "creeper", "bronze_tiger", "boomerang", "black_cat", "catwoman", "mystique", "juggernaught", "lobo", "hulk", "white_queen", "elektra", "deadshot", "polaris", "kraven"]

def Merc():
Mission_CustomAction('Mercenary', '', 'building_rundown', 'Call_mercenary', 18, 1)

def Call_mercenary(spawnName, dude):
heroesList = getAllHeroes()
heronum = len(heroesList)
if heronum <= 3:
Campaign_AddPrestige(-100)
heroList = GetMercList()
randMarker = 7
gotoMarker = "hero_" + `randMarker`
dude = heroList.pop(randint(0, len(heroList)-1))
Object_Spawn(dude, dude, gotoMarker)
AI_MakeIntoHero(dude)
NextStage()

this is the whole code, totally works.  i think the problem isn't in your code, but something to do with the setup of your character.

kiapet


DrMike2000

I remember AI_MakeIntoHero being buggy, and creating some strange hybrid character who didnt work correctly. If it was used in FFX for Freedom Force 1 ever, it got replaced with the respawn method, Im pretty sure.

In the Freedom Force missions by Irratioanl where they make a character playable half way through (eg Mentor or Eve's intro missions) they do it by destroying the old one and spawning in a hero template - I'd recommend just doing that.
Stranger Than Fiction:
The Strangers, Tales of the Navigator and Freedom Force X
www.fundamentzero.com