<- PRPL reference <- Ships
Arguments | Result | Notation |
---|---|---|
Ship UID, x, y | Hull code | [int int int - int] |
Returns what type of hull is at the position x, y on the specified ship. The coordinates are computed from the left-bottom corner and are zero-based. See this example created by planetfall.
The returned value is defined by this table. Decimal value is next to hexadecimal constants larger than 10 for clarity.
The function returns -1 if the ship id is invalid or the coordinates are out of range. This also ignores whether or not the ship is damaged, and returns data from the ship's plan instead.
# Do something if the center hull piece is a full armor block <-shipId GetShipHullWidth 2 div ->x <-shipId GetShipHullHeight 2 div ->y <-shipId <-x <-y GetShipHullSection 11 eq if # 11 - full armored block "Doing magic" Trace # ... endif