PDA

View Full Version : a generic item pick up script please.



shadowfall1976
11-19-2007, 07:32 PM
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.

Joe123
11-19-2007, 07:36 PM
item script string{
void run(int str){
Screen->Message(str);
}
}

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

shadowfall1976
11-19-2007, 07:38 PM
thanks Joe

EDIT: I can't get the script to work.....

Joe123
11-19-2007, 07:45 PM
oh, what's wrong?

Russ
11-19-2007, 09:37 PM
Make sure you attach it to the pickup tag script in the item editor, not the action tab script.

shadowfall1976
11-20-2007, 02:49 AM
nevermind, it works now, I forgot to do something.

Russ
11-20-2007, 11:58 AM
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.

beefster09
11-21-2007, 12:56 AM
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);
}
}

Gleeok
11-21-2007, 01:26 AM
What does moving it's argument do differently?

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


Perhaps link it to another blank message.