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

a generic item pick up script please.

8 replies · 2,419 views · Started 19 November 2007

I am in need of a generic item pick up script, that I can set to any item
by way of ID or some other way, to display a string when an item is picked up.

item script string{
void run(int str){
Screen->Message(str);
}
}

Where D0 in the item editor is the ID number of the string.

Make sure you attach it to the pickup tag script in the item editor, not the action tab script.

And another thing, make sure you have the rule "messages dissapear" checked, or the message will stay on screen. It can get anoying if the item happens to be in a room full of enemies, and a big string that says "You got the _____" is blocking the top half of the screen.

Hey, why not tweak it a little? Make it use the D7 argument so it will most likely not interfere with the action script. Like this:

item script string{
void run(int null0, int null1, int null2, int null3, int null4, int null5, int null6, int str){
Screen->Message(str);
}
}

What does moving it's argument do differently?

..Oh, I guess I should learn how to read.

Perhaps link it to another blank message.