equal
deleted
inserted
replaced
61 |
61 |
62 <code language="lua"> local player = AddHog("HH 1", 0, 100, "NoHat") -- botlevel 0 means human player |
62 <code language="lua"> local player = AddHog("HH 1", 0, 100, "NoHat") -- botlevel 0 means human player |
63 SetGearPosition(player, 1500, 1000) |
63 SetGearPosition(player, 1500, 1000) |
64 -- hint: If you don't call `SetGearPosition`, the hog spawns randomly</code> |
64 -- hint: If you don't call `SetGearPosition`, the hog spawns randomly</code> |
65 |
65 |
66 === `AddMissionHog(health)` (0.9.25) === |
66 === `AddMissionHog(health)` === |
67 Add a hedgehog for the current team, using the player-chosen team identity when playing in singleplayer missions. The “current team” is the last team that was added with `AddMissionTeam` or `AddTeam`. |
67 Add a hedgehog for the current team, using the player-chosen team identity when playing in singleplayer missions. The “current team” is the last team that was added with `AddMissionTeam` or `AddTeam`. |
68 |
68 |
69 The name and hat match the player's team definition. The hog is also always player-controlled. |
69 The name and hat match the player's team definition. The hog is also always player-controlled. |
70 |
70 |
71 Examples: |
71 Examples: |
486 <code language="lua"> |
486 <code language="lua"> |
487 SetGearAIHints(uselessHog, aihDoesntMatter) |
487 SetGearAIHints(uselessHog, aihDoesntMatter) |
488 -- This makes AI hogs stop caring about attacking uselessHog</code> |
488 -- This makes AI hogs stop caring about attacking uselessHog</code> |
489 |
489 |
490 == Hedgehog-specific gear properties == |
490 == Hedgehog-specific gear properties == |
491 === `IsHogAlive(gearUid)` (1.0.0) === |
491 === `IsHogAlive(gearUid)` === |
492 Returns `true` if specified gear is a hedgehog, alive, not about to die and not hidden. Returns `false` otherwise. |
492 Returns `true` if specified gear is a hedgehog, alive, not about to die and not hidden. Returns `false` otherwise. |
493 |
493 |
494 === `GetHogName(gearUid)` === |
494 === `GetHogName(gearUid)` === |
495 Returns the name of the specified hedgehog gear. |
495 Returns the name of the specified hedgehog gear. |
496 |
496 |
556 Returns the name of the voicepack of the team of the specified hedgehog gear. |
556 Returns the name of the voicepack of the team of the specified hedgehog gear. |
557 |
557 |
558 === `GetAmmoCount(gearUid, ammoType)` === |
558 === `GetAmmoCount(gearUid, ammoType)` === |
559 Returns the ammo count of the specified ammo type for the specified hedgehog gear. If infinite, returns `AMMO_INFINITE`. |
559 Returns the ammo count of the specified ammo type for the specified hedgehog gear. If infinite, returns `AMMO_INFINITE`. |
560 |
560 |
561 === `GetAmmoTimer(gearUid, ammoType)` (0.9.25) === |
561 === `GetAmmoTimer(gearUid, ammoType)` === |
562 Returns the currently configured ammo timer (in milliseconds) for the given hedgehog gear and specified ammo type. This is the timer which is set by the player by using the timer keys (1-5). For ammo types for which the timer cannot be changed, `nil` is returned. |
562 Returns the currently configured ammo timer (in milliseconds) for the given hedgehog gear and specified ammo type. This is the timer which is set by the player by using the timer keys (1-5). For ammo types for which the timer cannot be changed, `nil` is returned. |
563 |
563 |
564 Example: |
564 Example: |
565 <code lang="lua">GetAmmoTimer(CurrentHedgehog, amGrenade) |
565 <code lang="lua">GetAmmoTimer(CurrentHedgehog, amGrenade) |
566 -- May return 1000, 2000, 3000, 4000 or 5000</code> |
566 -- May return 1000, 2000, 3000, 4000 or 5000</code> |
580 Example: |
580 Example: |
581 |
581 |
582 <code language="lua"> HogTurnLeft(CurrentHedgehog, true) -- turns CurrentHedgehog left |
582 <code language="lua"> HogTurnLeft(CurrentHedgehog, true) -- turns CurrentHedgehog left |
583 HogTurnLeft(CurrentHedgehog, false) -- turns CurrentHedgehog right</code> |
583 HogTurnLeft(CurrentHedgehog, false) -- turns CurrentHedgehog right</code> |
584 |
584 |
585 === `IsHogHidden(gearUid)` (0.9.25) === |
585 === `IsHogHidden(gearUid)` === |
586 Returns true if hedgehog gear is hidden (e.g. via `HideHog` or the !TimeBox), false if it isn't, nil if that hedgehog never existed. |
586 Returns true if hedgehog gear is hidden (e.g. via `HideHog` or the !TimeBox), false if it isn't, nil if that hedgehog never existed. |
587 |
587 |
588 === `HideHog(gearUid)` === |
588 === `HideHog(gearUid)` === |
589 Removes a hedgehog from the map. The hidden hedgehog can be restored with `RestoreHog(gearUid)`. Returns `true` on success and `false` on failure (if gear does not exist / hog is already hidden). You must not hide all hogs at once. |
589 Removes a hedgehog from the map. The hidden hedgehog can be restored with `RestoreHog(gearUid)`. Returns `true` on success and `false` on failure (if gear does not exist / hog is already hidden). You must not hide all hogs at once. |
590 |
590 |