[doubt] onObjectShot and onObjectBump

Started by Fjose, Jan 26, 2015, 02:40 AM

Previous topic - Next topic

Fjose

how i can use these functions? ???
I was trying with a simple line to see if happens something and nothing :-\

Quotetest_object  <- CreateObject( 343, 1, -896.9, -338.783, 13.382, 255 );

function onObjectShot( object, player, weapon )
{
   if ( object == test_object ) { CreateExplosion( 1, 4, Vector( -896.9, -338.783, 13.382 ), -1, true ); Message( "aa" ); }
}

function onObjectBump( o, p )
{
   if ( object == test_object ) { CreateExplosion( 1, 4, Vector( -896.9, -338.783, 13.382 ), -1, true ); Message( "aa" ); }
}

.

Make sure you track those events with object.TrackingShots = true; and object.TrackingBumps = true; . I haven't tested this either.
.

Fuzzie

Quote from: S.L.C on Jan 26, 2015, 06:25 AMMake sure you track those events with object.TrackingShots = true; and object.TrackingBumps = true; . I haven't tested this either.
This will work. I tested it already.

Fjose