Game Development Community

Schedule an onPickup

by Chad Kilgore · in Torque Game Engine · 05/04/2007 (8:10 am) · 1 replies

I'm trying to schedule on ItemData::onPickup without the player necessarily being in the appropriate pickup radius. Because ItemData::onPickup reads:

function ItemData::onPickup(%this, %obj, %user, %amount)

I am using schedule as:

%this.schedule( 300, 0,  "onPickup", %obj, %user, %amount);

I have also tried the same thing with %this as the first parameter. Am I using schedule correctly? Thanks.

#1
05/04/2007 (8:22 am)
%this.schedule( 300, "onPickup", %obj, %user, %amount);

You can drop the second parameter (the 0) when scheduling in this fashion.