PDA

View Full Version : Shield item



PizzaMan
04-11-2009, 09:58 PM
Hey, is there a script for a shield like the one in Links Awakening that you have to press a button to use? If not, could someone make one?

Pielord
04-12-2009, 12:38 AM
Would something like this work?

item script Button_Shield{
void run(shieldID){
if(Link->Item[shieldID]==false){
Link->Item[shieldID]=true;
}
else{Link->Item[shieldID]=false;}
}
}
Make a dummy item that looks like a shield but does nothing then set this as it's action script then set D0 to the item id of the actual shield.(I'm assuming that you know how to set item scripts up correct?)
Also keep in mind I haven't tested this yet. And you will probably need to edit your pause screen a little bit.

PizzaMan
04-12-2009, 04:20 PM
It says "unexpected identifier on token shieldid". Do you know whats wrong?

Edit:
I got the script to work but after I set up the item pressing the button didn't seem to make a difference.

Joe123
04-12-2009, 04:36 PM
item script Button_Shield{
void run(int shieldID){
if(Link->Item[shieldID]==false){
Link->Item[shieldID]=true;
}
else{Link->Item[shieldID]=false;}
}
}

Try that.

Not that it'll work how you want it to really, but it will compile.

PizzaMan
04-12-2009, 04:53 PM
Yeah it compiles now but is there any way to actually make it work?

Edit:
What I really want is a shield that only appears on link when on a or b and is at links side unless the button is pressed.
Could that be done?

Christian
04-12-2009, 05:46 PM
Yes it can be done.

You need a section in your global script for it to work.

if you want , you can wait for me to write it or have someone else do it for you.

PizzaMan
04-12-2009, 07:42 PM
If you could do it that would be fine.

PizzaMan
04-21-2009, 10:19 PM
I'm not trying to be rude but do you know how much longer it will be?