$$ACTION Weather Create lighting between [o:Object1] and [o:Object2]; 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] aLightningCreate Create lighting between two objects Creates a lighting effect between two specified obejcts Parameters: Object1, Object2: Whe
| 1497 | $$END |
| 1498 | */ |
| 1499 | void aLightningCreate(int objhandle1, int objhandle2, float lifetime, float thickness, int numtiles, int texture_id, |
| 1500 | float slidetime, int timesdrawn, int red, int green, int blue, bool autotile) { |
| 1501 | msafe_struct mstruct; |
| 1502 | int type; |
| 1503 | |
| 1504 | Obj_Value(objhandle1, VF_GET, OBJV_I_TYPE, &type); |
| 1505 | if (type == OBJ_NONE) |
| 1506 | return; |
| 1507 | |
| 1508 | Obj_Value(objhandle2, VF_GET, OBJV_I_TYPE, &type); |
| 1509 | if (type == OBJ_NONE) |
| 1510 | return; |
| 1511 | |
| 1512 | Obj_Value(objhandle1, VF_GET, OBJV_I_ROOMNUM, &mstruct.roomnum); |
| 1513 | Obj_Value(objhandle1, VF_GET, OBJV_V_POS, &mstruct.pos); |
| 1514 | Obj_Value(objhandle2, VF_GET, OBJV_V_POS, &mstruct.pos2); |
| 1515 | |
| 1516 | mstruct.objhandle = objhandle1; |
| 1517 | mstruct.ithandle = objhandle2; |
| 1518 | mstruct.lifetime = lifetime; |
| 1519 | mstruct.size = thickness; |
| 1520 | |
| 1521 | mstruct.interval = slidetime; |
| 1522 | mstruct.count = timesdrawn; |
| 1523 | mstruct.index = numtiles; |
| 1524 | mstruct.texnum = texture_id; |
| 1525 | mstruct.color = ((red >> 3) << 10) | ((green >> 3) << 5) | (blue >> 3); |
| 1526 | |
| 1527 | if (autotile) |
| 1528 | mstruct.state = 1; |
| 1529 | else |
| 1530 | mstruct.state = 0; |
| 1531 | |
| 1532 | mstruct.flags = 0; |
| 1533 | |
| 1534 | MSafe_CallFunction(MSAFE_WEATHER_LIGHTNING_BOLT, &mstruct); |
| 1535 | } |
| 1536 | |
| 1537 | /* |
| 1538 | $$ACTION |
no test coverage detected