<- [[.:prplreference| PRPL reference]] <- [[.:prplreference#ships|Ships]] ===== GetShipHullSection ===== ^Arguments^Result^Notation^ | Ship UID, x, y | Hull code | [int int int - int] | === Description === 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 [[http://i.imgur.com/eH9HdZO.png|this example]] created by planetfall. The returned value is defined by [[http://image.prntscr.com/image/a43bbe39ab264a60a3889547ac938f47.png|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. === Examples === # 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