onObjectBump dose wokring

Started by Slark__, Oct 10, 2016, 09:13 AM

Previous topic - Next topic

Slark__

function onObjectBump(object, player)
{
if ( object == gate )
{
MessagePlayer("Hello",player);
}
}

dose not working help pls.

EK.IceFlake

There was a property, you must set it to 'true', it's called object.TrackingBumps
object.TrackingBumps = true;

Slark__

Quote from: EK.CrystalBlue on Oct 10, 2016, 12:03 PMThere was a property, you must set it to 'true', it's called object.TrackingBumps
object.TrackingBumps = true;

like that?

function onObjectBump(object, player)
{
if ( object == gate )
{
object.TrackingBumps = true;
MessagePlayer("Hello",player);
}
}

Kewun

no..
when you used
gate <- CreateObject, after that, put gate,TrackingBumps = true
so

gate<-CreateObject(Yourshits)
gate.TrackingBumps=true

Diego^

An example:

function onScriptLoad()
{
gate <- CreateObject( 405, 1, 1.1111, 1.1111, 1.1111, 255 );
gate.TrackingBumps = true;
}

function onObjectBump( object, player )
{
if ( object.ID == gate.ID ) player.Kick();
}
BRL's Developer.