daily pastebin goal
56%
SHARE
TWEET

Untitled

a guest Jun 10th, 2018 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public void OnStartup(){
  2.     IObjectTimerTrigger Timer0 = (IObjectTimerTrigger)Game.CreateObject("TimerTrigger");
  3.     Timer0.SetIntervalTime(400);
  4.     Timer0.SetRepeatCount(0);
  5.     Timer0.SetScriptMethod("Test");
  6.     Timer0.Trigger();
  7. }
  8.  
  9. public void Test(TriggerArgs args){
  10.     foreach(IPlayer ply in Game.GetPlayers()){
  11.         if(ply.IsKicking&&ply.IsWalking){
  12.         Vector2 Here = ply.GetWorldPosition() + new Vector2(10, 5);
  13.         Vector2 Here2 = ply.GetWorldPosition() + new Vector2(-10, 5);
  14.         int playr_dir = ply.FacingDirection;
  15.             if (playr_dir == 1) {
  16.                 Game.CreateObject("BarrelExplosive", Here2, 0f);
  17.             }
  18.             if (playr_dir == -1) {
  19.                 Game.CreateObject("BarrelExplosive", Here, 0f);
  20.             }
  21.         }
  22.     }
  23. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top