changeset 625 | e463f9d97820 |
parent 624 | e5a435750723 |
child 626 | c243eb309e6f |
624:e5a435750723 | 625:e463f9d97820 |
---|---|
508 CurrentHedgehog, thus making it invisible.]] |
508 CurrentHedgehog, thus making it invisible.]] |
509 </code> |
509 </code> |
510 |
510 |
511 |
511 |
512 === <tt>!GetGearMessage(gearUid)</tt> === |
512 === <tt>!GetGearMessage(gearUid)</tt> === |
513 Returns the message of the gear. |
513 Returns the message of the gear. This is a bitmask built out of flags seen in [GearMessages]. |
514 |
514 |
515 === <tt>!GetTag(gearUid)</tt> === |
515 === <tt>!GetTag(gearUid)</tt> === |
516 Returns the tag of the specified gear (by `gearUid`). |
516 Returns the tag of the specified gear (by `gearUid`). |
517 |
517 |
518 A “tag” of a gear is simply an extra variable to modify misc. things. The meaning of a tag depends on the gear type. For example, for gtBall gears, it specifies the ball color, for gtAirAttack gears (airplane) it specifies the direction of the plane, etc. `tag` has to be an integer. |
518 A “tag” of a gear is simply an extra variable to modify misc. things. The meaning of a tag depends on the gear type. For example, for gtBall gears, it specifies the ball color, for gtAirAttack gears (airplane) it specifies the direction of the plane, etc. `tag` has to be an integer. |
552 `Angle, Power, WDTimer, Radius, Density, Karma, DirAngle, AdvBounce, ImpactSound, nImpactSounds, Tint` |
552 `Angle, Power, WDTimer, Radius, Density, Karma, DirAngle, AdvBounce, ImpactSound, nImpactSounds, Tint` |
553 |
553 |
554 A rough description of some of the parameters: |
554 A rough description of some of the parameters: |
555 |
555 |
556 * `Radius`: Effect or collision radius, most of the time |
556 * `Radius`: Effect or collision radius, most of the time |
557 * `ImpactSound`: Sound it makes on a collision (see [[Sounds]]) |
557 * `ImpactSound`: Sound it makes on a collision (see [Sounds]) |
558 * `Tint`: Used by some gear types to determine its colorization. The color is in RGBA format. |
558 * `Tint`: Used by some gear types to determine its colorization. The color is in RGBA format. |
559 |
559 |
560 Example: |
560 Example: |
561 <code language="lua"> |
561 <code language="lua"> |
562 -- Get all values in a single line of code: |
562 -- Get all values in a single line of code: |
824 --[[ The reverse of the above: This function toggles CurrentHedgehog’s |
824 --[[ The reverse of the above: This function toggles CurrentHedgehog’s |
825 gstInvisible flag off, thus making it visible again. ]] |
825 gstInvisible flag off, thus making it visible again. ]] |
826 </code> |
826 </code> |
827 |
827 |
828 === <tt>!SetGearMessage(gearUid, message)</tt> === |
828 === <tt>!SetGearMessage(gearUid, message)</tt> === |
829 >Sets the message of the specified gear. |
829 Sets the gear messages of the specified gear. `message` is a bitmask built out of flags seen in [GearMessages]. |
830 |
830 |
831 === <tt>!SetTag(gearUid, tag)</tt> === |
831 === <tt>!SetTag(gearUid, tag)</tt> === |
832 Sets the tag of the specified gear (by `gearUid`). A “tag” of a gear is simply an extra variable to modify misc. things. The meaning of a tag depends on the gear type. For example, for gtBall gears, it specifies the ball color, for gtAirAttack gears (airplane) it specifies the direction of the plane, etc. `tag` has to be an integer. |
832 Sets the tag of the specified gear (by `gearUid`). A “tag” of a gear is simply an extra variable to modify misc. things. The meaning of a tag depends on the gear type. For example, for gtBall gears, it specifies the ball color, for gtAirAttack gears (airplane) it specifies the direction of the plane, etc. `tag` has to be an integer. |
833 |
833 |
834 Note that the word “tag” here does _not_ refer to the name and health tags you see above hedgehogs, this is something different. |
834 Note that the word “tag” here does _not_ refer to the name and health tags you see above hedgehogs, this is something different. |
997 * `grave`: The name of the team’s grave (equals file name without the suffix) |
997 * `grave`: The name of the team’s grave (equals file name without the suffix) |
998 * `fort`: The name of the team’s fort |
998 * `fort`: The name of the team’s fort |
999 * `voicepack`: The name of the team’s voice pack (equals the directory name) |
999 * `voicepack`: The name of the team’s voice pack (equals the directory name) |
1000 * `flag`: Optional argument for the name of the team’s flag (equals file name without the suffix) |
1000 * `flag`: Optional argument for the name of the team’s flag (equals file name without the suffix) |
1001 |
1001 |
1002 *Note: This works only for singleplayer training missions for now and will desync multiplayer games. |
1002 *Note*: This works only for singleplayer training missions for now and will desync multiplayer games. |
1003 |
1003 |
1004 Example: |
1004 Example: |
1005 |
1005 |
1006 <code language="lua">AddTeam("team 1", 0xDD0000, "Simple", "Tank", "Default", "hedgewars") |
1006 <code language="lua">AddTeam("team 1", 0xDD0000, "Simple", "Tank", "Default", "hedgewars") |
1007 --[[ Adds a new team with name “team 1”, red color (hexadecimal notation), the grave “Simple”, |
1007 --[[ Adds a new team with name “team 1”, red color (hexadecimal notation), the grave “Simple”, |