Author Topic: [vehicle] play animation and sound on enter/leave  (Read 1498 times)

Could someone show me a script of how to play an animation and sound when entering/leaving a vehicle?
(The vehicle must play the sound and the animations)

I just can't figure it out


trace(1);
you're trying to say something, but I don't understand how trace is going to work

Trace logs to the console every function that is called while it's enabled. If you do it right, you can find the callbacks for entering a vehicle.

Trace logs to the console every function that is called while it's enabled. If you do it right, you can find the callbacks for entering a vehicle.
Ah, so that's what trace is for! Allright, will use it, thanks

Used trace, but the console just says "entering moveforward" and "entering jump", nothing like "entering vehicle" D:
Anyone?

I'm pretty sure it's entering functions that use playermoveforward and playerjump, but I don't know why it doesn't say something with the vehicle.

me neither, that's the problem

Disable mods like the Hats mod, Portal Gun and Target Events as these use constant schedules for checking.
Spawn a jeep. Get in it then jet so you're standing on top of it.
Type "jump();jump();trace(1);schedule(3000,0,trace,0);" in the console.

Code: [Select]
==>jump();jump();trace(1);schedule(3000,0,trace,0);
   Console trace is on.
Leaving ConsoleEntry::eval() - return
Entering [TankPackage]armor::onTrigger(44, 16831, 2, 1)
   Entering [DefractionGun]armor::onTrigger(44, 16831, 2, 1)
      Entering armor::onTrigger(44, 16831, 2, 1)
      Leaving armor::onTrigger() - return
   Leaving [DefractionGun]armor::onTrigger() - return
Leaving [TankPackage]armor::onTrigger() - return
Entering [TankPackage]armor::onTrigger(44, 16831, 2, 0)
   Entering [DefractionGun]armor::onTrigger(44, 16831, 2, 0)
      Entering armor::onTrigger(44, 16831, 2, 0)
      Leaving armor::onTrigger() - return
   Leaving [DefractionGun]armor::onTrigger() - return
Leaving [TankPackage]armor::onTrigger() - return
Entering [HEGrenadePackage]armor::onCollision(44, 16831, 17217, 0.000003 -0.000006 -11.550158, 11.550158)
   Entering [SmokeGrenadePackage]armor::onCollision(44, 16831, 17217, 0.000003 -0.000006 -11.550158, 11.550158, , , , )
      Entering armor::onCollision(44, 16831, 17217, 0.000003 -0.000006 -11.550158, 11.550158)
      Leaving armor::onCollision() - return
   Leaving [SmokeGrenadePackage]armor::onCollision() - return
Leaving [HEGrenadePackage]armor::onCollision() - return
Entering WheeledVehicleData::onCollision(912, 17217, 16831, 0.000003 -0.000006 -11.550158, 11.550158)
   Entering findClientByBL_ID(999999)
   Leaving findClientByBL_ID() - return 15250
   Entering getTrustLevel(16831, 17217)
   Leaving getTrustLevel() - return 3
   Entering miniGameCstar fishe(16831, 17217)
   Leaving miniGameCstar fishe() - return 1
   Entering miniGameCstar fishe(16831, 17217)
   Leaving miniGameCstar fishe() - return 1
   Entering minigamecandamage(16831, 17217)
      Entering getMiniGameFromObject(16831)
      Leaving getMiniGameFromObject() - return -1
      Entering getMiniGameFromObject(17217)
      Leaving getMiniGameFromObject() - return -1
   Leaving minigamecandamage() - return -1
   Entering [TankPackage]armor::onMount(44, 16831, 17217, 0)
      Entering armor::onMount(44, 16831, 17217, 0)
         Entering ServerPlay3D(playerMountSound, 108.881 -131.719 287.886)
         Leaving ServerPlay3D() - return
      Leaving armor::onMount() - return
   Leaving [TankPackage]armor::onMount() - return
Leaving WheeledVehicleData::onCollision() - return
Console trace is off.
I entered a jeep^
Is it the armor::onMount function?

Yes.

Try things yourself instead of coming back for help every ten seconds. It will really help you more.

thanks

will do that, I promise ;D