This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| prpl:getshipfromslot [2016/12/17 22:38] – planetfall | prpl:getshipfromslot [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 4: | Line 4: | ||
| ^Arguments^Result^Notation^ | ^Arguments^Result^Notation^ | ||
| - | |int| int| [int- int] | | + | | Slot ID | Ship ID | [ int - int ] | |
| === Description === | === Description === | ||
| - | int ARG1: Slot ID. Valid slot IDs are 0 to 23 inclusive. | + | Returns the Ship ID for any built ship associated with a given build slot. Valid slot IDs are 0 to 23 inclusive. (Note: -1 may be the HQ slot.) |
| - | + | ||
| - | Returns the Ship UID for any built ship associated with a given build slot. -1 is returned if there is not ship. | + | |
| === Examples === | === Examples === | ||
| - | < | + | < |
| - | </code> | + | CreateList ->PlayerFleet |
| + | 24 -1 do | ||
| + | I GetShipFromSlot ->Ship | ||
| + | <-Ship 0 gte if | ||
| + | < | ||
| + | endif | ||
| + | loop | ||
| + | # | ||
| + | </ | ||