Read-only archive of the Armageddon Games Forums Archive (2000–2026) · About this archive

Simple idea, perfered help.

2 replies · 1,512 views · Started 11 June 2007

I would like to have an item script to attach to an item. The idea is for a weapon that increases in power when you lose hearts. If you have at most 1 heart left, the item's power tripples. And help would be nice, and if you don't want to, that's fine too.

I'm just guessing here, but you might be able to use Item->Class->Level to change the level of a sword if your HP is below a threshold. Something like:

item script PerilSword{
void run()
{
itemclass ic = this->Class;
if(Link->HP < (2*16)+1) // Link has 2 hearts or less
{
ic->Level = 4; // master sword
}
else
{
ic->Level = 1; // wooden sword
}
}
}

...but that probably won't actually change the power. I think you would need direct access to something like Item->Power, which isn't available yet.

Go ahead and play with it, though.