565 |
565 |
566 === `IsHogHidden(gearUid)` (0.9.25) === |
566 === `IsHogHidden(gearUid)` (0.9.25) === |
567 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. |
567 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. |
568 |
568 |
569 === `HideHog(gearUid)` === |
569 === `HideHog(gearUid)` === |
570 Removes a hedgehog from the map. The hidden hedgehog can be restored with `RestoreHog(gearUid)`. Since 0.9.23, returns `true` on success and `false` on failure (if gear does not exist / hog is already hidden). |
570 Removes a hedgehog from the map. The hidden hedgehog can be restored with `RestoreHog(gearUid)`. Since 0.9.23, 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. |
571 |
571 |
572 Example: |
572 Example: |
573 |
573 |
574 <code language="lua"> gear = AddGear(...) |
574 <code language="lua"> local gear = AddHog(...) |
575 HideHog(gear) -- Hide the newly created gear.</code> |
575 HideHog(gear) -- Hide the newly created gear.</code> |
576 |
576 |
577 === `RestoreHog(gearUid)` === |
577 === `RestoreHog(gearUid)` === |
578 Restores a previously hidden hedgehog. Nothing happens if the hedgehog does not exist or is not hidden. |
578 Restores a previously hidden hedgehog. Nothing happens if the hedgehog does not exist or is not hidden. |
579 |
579 |
580 Example: |
580 Example: |
581 |
581 |
582 <code language="lua"> gear = AddGear(...) |
582 <code language="lua"> local gear = AddHog(...) |
583 HideHog(gear) -- Hide the newly created gear. |
583 HideHog(gear) -- Hide the newly created gear. |
584 RestoreHog(gear) -- Restore the newly hidden gear.</code> |
584 RestoreHog(gear) -- Restore the newly hidden gear.</code> |
585 |
585 |
586 === `IsHogLocal(gearUid)` (0.9.23) === |
586 === `IsHogLocal(gearUid)` (0.9.23) === |
587 Returns `true` if the specified hedgehog gear is controlled by a human player on the computer on which Hedgewars runs on (i.e. not over a computer over the network). Also returns `true` if the hog is a member of any of the local clans. Returns `false` otherwise. Returns `nil` if `gearUid` is invalid. |
587 Returns `true` if the specified hedgehog gear is controlled by a human player on the computer on which Hedgewars runs on (i.e. not over a computer over the network). Also returns `true` if the hog is a member of any of the local clans. Returns `false` otherwise. Returns `nil` if `gearUid` is invalid. |