Freedom Reborn

Freedom Force Forums => Scripting Forum => Topic started by: bearded on October 27, 2010, 05:12:31 AM

Title: loot idea for ffx attribute
Post by: bearded on October 27, 2010, 05:12:31 AM
the idea is if the badguy get's ko'ed and has the 'loot' attribute, on his location a pistol is dropped, using the pistol ffx, the hero can click on it and a pistol is attached to his hand, six shots, same as the regular pistol weapons ffx.
this could be customized to be a freeze gun for captain cold, or, well, anything really.
i can almost manage the code, but any tips would be great. i'll post what i figure out.
Title: Re: loot idea for ffx attribute
Post by: bearded on May 12, 2022, 01:50:55 AM
I know how to custom the code for this. I'll post it tonight.
Title: Re: loot idea for ffx attribute
Post by: bearded on May 12, 2022, 06:12:45 AM
def GetLootList():
return ["ffx_flamethrower", "ffx_handgun", "ffx_raygun", "ffx_electronux", "ffx_megarod", "gl_battery", "axe", "powerup_cp", "powerup_ep", "powerup_hp", "powerup_pp", "battleaxe", "halberd", "hammer", "naginata", "scythe", "staff", "club", "trident", "mace", "longsword", "swordnshield", "iceclaw", "sledge"]

and
def VillianDead(event):
        lootList = GetLootList()
        loot = lootList.pop(randint(0, len(lootList)-1))
        pos = Get_ObjectPos(event.object)
        Object_SpawnAt(loot, pos, loot)

Totally works. Is it possible to turn it into an attribute so it can be customized using ffxedit to drop different things instead of random things? Like thugs drop guns or bats, Thor drops his hammer, etc.
Title: Re: loot idea for ffx attribute
Post by: Epimethee on May 12, 2022, 11:41:34 AM
Love it, Bearded! (I'm quite jealous that I never thought of it. Darn!)
Title: Re: loot idea for ffx attribute
Post by: oktokels on May 12, 2022, 02:18:47 PM
Very impressive work !! Nice to have a scripter around
Title: Re: loot idea for ffx attribute
Post by: jackhart1967 on May 12, 2022, 03:45:31 PM
Noticed the other night that (Marvel's) Valkyrie (OG) mesh drops her sword when she's knocked out & it just lays there on the ground next to her for a bit. Not sure if that info helps, but I'd not seen that happen w/ a weapon before.

Either way - AWESOME idea