Author Topic: How would you connect to the object of a dropped item?  (Read 1457 times)

For instance, if I were to drop a wrench, how could I connect to that dropped wrench and make it, say, have a variable?

Also, another quick question; Is there a "scripting version" of onActivate? If so, what is it?
onTrigger, right? got it
« Last Edit: June 13, 2010, 02:09:57 PM by ottosparks »


Also, another quick question; Is there a "scripting version" of onActivate? If so, what is it?
onTrigger, right? got it
Use Player::activateStuff instead of armor::onTrigger

Use Player::activateStuff instead of armor::onTrigger

If I were to be setting a brick to automatically set events, I would do that? That's what I really need to know...
« Last Edit: June 13, 2010, 05:47:19 PM by ottosparks »

If I were to be setting a brick to automatically set events, I would do that? That's what I really need to know...
That's completely different to what you asked for. If you were setting events automatically then you need to look at JVS Content's server.cs on line 962 to line 977.

As for getting the object ID of an item you drop, I'm fairly sure serverCmdDropTool(%client) returns the item object ID that was just made.

As for getting the object ID of an item you drop, I'm fairly sure serverCmdDropTool(%client) returns the item object ID that was just made.

hrm. I was thinking that just made you drop the item. But it does that as well.

so. then I would use ItemData::stuffHere from then on?

:I

I really just need to know how to set a variable onto the dropped item

hrm. I was thinking that just made you drop the item. But it does that as well.
Do you know what he meant?..

Do you know what he meant?..

apparently not from your reaction.

Do you know what he meant?..

If I did serverCmdDropItem(%client, %arg1)

would arg1 be the ID of it

I asked someone before, they said the same thing, though they also said something about arg1.

meh

Code: [Select]
package lerntotryplease
{
function serverCmdDropTool(%client)
{
%item = Parent::serverCmdDropTool(%client);
//hey look the item object is %item
}
};
activatePackage(lerntotryplease);

Code: [Select]
package lerntotryplease
{
function serverCmdDropTool(%client)
{
%item = Parent::serverCmdDropTool(%client);
//hey look the item object is %item
}
};
activatePackage(lerntotryplease);

Thanks. Locking.