$$ACTION Weather Create lighting between gunpoints [i:Gunpoint1=0] & [i:Gunpoint2=1] of [o:Object=OWNER]; with [f:Lifetime=1.0], [f:Thickness=1.0], [i:NumTiles=1], [u:Texture], [f:SlideTime=0], [i:TimesDrawn=1], and color=[i:Red=255],[i:Green=255],[i:Blue=255], AutoTile=[b:AutoTile=false] aLightningCreateGunpoints Create lighting between gunpoints Creates a lighting effect between two specified gu
| 1556 | $$END |
| 1557 | */ |
| 1558 | void aLightningCreateGunpoints(int gunpoint1, int gunpoint2, int objhandle, float lifetime, float thickness, |
| 1559 | int numtiles, int texture_id, float slidetime, int timesdrawn, int red, int green, |
| 1560 | int blue, bool autotile) { |
| 1561 | msafe_struct mstruct; |
| 1562 | |
| 1563 | mstruct.objhandle = objhandle; |
| 1564 | MSafe_GetValue(MSAFE_OBJECT_POS, &mstruct); |
| 1565 | MSafe_GetValue(MSAFE_OBJECT_ROOMNUM, &mstruct); |
| 1566 | if (mstruct.roomnum == -1) |
| 1567 | return; |
| 1568 | |
| 1569 | mstruct.g1 = gunpoint1; |
| 1570 | mstruct.g2 = gunpoint2; |
| 1571 | |
| 1572 | mstruct.lifetime = lifetime; |
| 1573 | mstruct.size = thickness; |
| 1574 | mstruct.interval = slidetime; |
| 1575 | mstruct.count = timesdrawn; |
| 1576 | mstruct.index = numtiles; |
| 1577 | mstruct.texnum = texture_id; |
| 1578 | mstruct.color = ((red >> 3) << 10) | ((green >> 3) << 5) | (blue >> 3); |
| 1579 | |
| 1580 | if (autotile) |
| 1581 | mstruct.state = 1; |
| 1582 | else |
| 1583 | mstruct.state = 0; |
| 1584 | |
| 1585 | mstruct.flags = 1; |
| 1586 | |
| 1587 | MSafe_CallFunction(MSAFE_WEATHER_LIGHTNING_BOLT, &mstruct); |
| 1588 | } |
| 1589 | |
| 1590 | /* |
| 1591 | $$ACTION |