BlastedEarth

Joined: 05 Oct 2009 Posts: 243
|
Posted: Fri Jan 29, 2010 1:52 am Post subject: Equipment changes hero |
|
|
Hi i need a script to make an equipment that changes the hero when equipped and changes back when equipment is removed...
It's important in the game because the hero when "armored" has bonuses and while "naked" cannot equip large things like, cannons, radars, robot stuff... So i made two versions for each hero, one as a pilot and one as a mecha. Then there would be an unremovable equipment called "clothing" that sets the hero to just the pilot itself which has its own attacks and weapons. Clothing cannot be removed but can be replaced with "Armor" which will change the hero into a giant robot with its own attacks and equipment. My problem is i cant make a perfect script, here are my attempts:
variables used:
pilotarmored: finds the main hero
pilotnaked: finds the naked alternate
1st trial:
if ((check equipment (pilotarmored,4))==Clothing)
then, begin
unlock hero(pilotnaked)
swap in hero(pilotnaked)
swap out hero(pilotarmored)
lock hero(pilotarmored)
unequip(pilotarmored,4)
end
else, begin
unlock hero(pilotarmored)
swap in hero(pilotamored)
swap out hero(pilotnaked)
lock hero(pilotnaked)
unequip(pilotnaked,4)
end
*This one's weird. It doesnt work and equipping "clothing" on another party member makes the wearer disappear. I'm guessing it's probably because this script is in the new game/load game script and the starting hero seems to cancel himself out. Sometimes he just blinks while the intro text are being displayed and disappears leaving only the one party member.
2nd trial:
if ((check equipment (pilotarmored,4))==Clothing)
then, begin
show text box (151)
wait(1)
unequip(clothing,4)
set tag(tag:Pilot is armored,off)
end
else, begin
set tag(tag:Pilot is armored,on)
end
*this one works but uses npcs and textboxes from within custom. it requires an npc to follow the characters around to activate textboxes and is not efficient because each character will be followed by an npc and the npc disappears as soon as the tag is set "off".
Any better ideas? _________________ So many ideas, so little focus. Monk spirit please lend me your power!
 |
|