Guest User

Untitled

a guest
Apr 30th, 2019
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.61 KB | None | 0 0
  1. #library "BFGBALL"
  2. #include "zcommon.acs"
  3.  
  4. int currentMasterTID = 0;
  5.  
  6. script "NewBFGBallScript_SetMaster" (void)
  7. {
  8.     currentMasterTID = UniqueTID();
  9.     Thing_ChangeTID(0, currentMasterTID);
  10. }
  11.  
  12. script "NewBFGBallScript_FireRail" (void)
  13. {
  14.     int currentTID = UniqueTID();
  15.     int oldTID = ActivatorTID();
  16.     Thing_ChangeTID(0, currentTID);
  17.    
  18.     SetActivator(currentMasterTID);
  19.     // now operating on BFG ball
  20.     SetPointer(AAPTR_TARGET, currentTID);
  21.     SetActorState(0, "FireRail");
  22.     // done, switch back and restore TID
  23.     SetActivator(currentTID);
  24.     Log(s:"monster: ", s:GetActorClass(0));
  25.     Thing_ChangeTID(0, oldTID);
  26. }
Add Comment
Please, Sign In to add comment