Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: DizzasTeR on Mar 19, 2015, 06:35 AM

Title: Event not getting called again? onObjectBump and Shot
Post by: DizzasTeR on Mar 19, 2015, 06:35 AM
Alright this issue is just horrible... i did alot of tests but didn't succeed in calling these events.

obj <- CreateObject(....
obj.TrackingBumps = true;

When i do this on the bump object event..

if ( object == obj ) print( "called " );
It doesnt print anything along with no errors.

Am i understanding it wrong that what bumping in object means? Thats why i dont get the print? I would also like to know exactly what object bumping means and if i am doing correctly why the event is not working.
Title: Re: Event not getting called again? onObjectBump and Shot
Post by: Thijn on Mar 19, 2015, 06:47 AM
Im not entirely sure, but try comparing the IDs instead of instances. Like so:
if ( object.ID == obj.ID ) print( "called" );
Title: Re: Event not getting called again? onObjectBump and Shot
Post by: DizzasTeR on Mar 19, 2015, 07:13 AM
That worked, thank you Thijn.

But the bad news is it only works when on foot, not in vehicle....