400 |
400 |
401 === <tt>!GetGearRadius(gearUid)</tt> === |
401 === <tt>!GetGearRadius(gearUid)</tt> === |
402 Returns radius for the specified gear. |
402 Returns radius for the specified gear. |
403 |
403 |
404 === <tt>!GetGearVelocity(gearUid)</tt> === |
404 === <tt>!GetGearVelocity(gearUid)</tt> === |
405 Returns a tuple of dx,dy values for the specified gear |
405 Returns a tuple of dx,dy values for the specified gear. |
|
406 |
|
407 === <tt>!GetFlightTime(gearUid)</tt> === |
|
408 Returns the `FlightTime` of the specified gear. The `FlightTime` is a gear varialbe used to store a general time interval. The precise meaning of the `FlightTime` depends on the gear type. |
|
409 |
|
410 For example: The `FlightTime` of a hedgehog (`gtHedgehog`) is the time since they last have stood on solid ground. For most projectile gear types (i.e. `gtShell`), it stores the time after it has been launched. |
406 |
411 |
407 === <tt>!GetGearElasticity(gearUid) </tt> === |
412 === <tt>!GetGearElasticity(gearUid) </tt> === |
408 Returns the elasticity of the specified gear. Useful for determining if a hog is on a rope or not. If a hog is attached to a rope, or is busy firing one, the elasticity of the rope will be non-zero. |
413 Returns the elasticity of the specified gear. Useful for determining if a hog is on a rope or not. If a hog is attached to a rope, or is busy firing one, the elasticity of the rope will be non-zero. |
409 |
414 |
410 === <tt>!GetHogClan(gearUid)</tt> === |
415 === <tt>!GetHogClan(gearUid)</tt> === |
606 === <tt>!SetGearPosition(gearUid, x, y)</tt> === |
611 === <tt>!SetGearPosition(gearUid, x, y)</tt> === |
607 Places the specified gear exactly at the position (`x`,`y`). |
612 Places the specified gear exactly at the position (`x`,`y`). |
608 |
613 |
609 === <tt>!SetGearVelocity(gearUid, dx, dy)</tt> === |
614 === <tt>!SetGearVelocity(gearUid, dx, dy)</tt> === |
610 Gives the specified gear the velocity of `dx`, `dy`. |
615 Gives the specified gear the velocity of `dx`, `dy`. |
|
616 |
|
617 === <tt>!SetFlightTime(gearUid, flighttime)</tt> === |
|
618 Sets the `FlightTime` of the given gear to `flighttime`. The meaning of `FlightTime` is explained in the section `GetFlightTime`. |
611 |
619 |
612 === <tt>!SetAmmo(ammoType, count, probability, delay, numberInCrate)</tt> === |
620 === <tt>!SetAmmo(ammoType, count, probability, delay, numberInCrate)</tt> === |
613 This updates the settings for a specified [AmmoTypes Ammo Type] as of count available for players, spawn probability, availability delay in turns, and the number available in crates. This is supposed to be used in the `onAmmoStoreInit()` event handler. |
621 This updates the settings for a specified [AmmoTypes Ammo Type] as of count available for players, spawn probability, availability delay in turns, and the number available in crates. This is supposed to be used in the `onAmmoStoreInit()` event handler. |
614 |
622 |
615 Example: |
623 Example: |