Advertisement
Guest User

Bomb Arrows fer my game Version 1

a guest
Dec 22nd, 2014
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1. import "std.zh"
  2. int ArrowTile;
  3. int BombTile;
  4. int LinkDir;
  5. //Put constants here.
  6. //Put Global Variables here (Variables that ALL scripts in the quest use can use,
  7. //and editing it will effect all scripts using these variables Be careful).
  8. item script PortalGun //'ffc' can be 'item' or 'global', too.
  9.  
  10. {
  11. void run(int d1, int d2)
  12. //while(true) //Most often used loop.
  13. {
  14. // Put Local Variables here.
  15.  
  16. ArrowTile = d1; // The tile of the Portal
  17. BombTile = d2; // Do I even..
  18.  
  19.  
  20.  
  21. LinkDir = Link->Dir;
  22. lweapon Arrow = Screen->CreateLWeapon(LW_ARROW, Link->X, Link->Y);
  23. lweapon Bomb = Screen->CreateLWeapon(LW_BOMB, Link->X, Link->Y);
  24. Arrow->Dir = LinkDir;
  25. Arrow->Damage = 4;
  26. Arrow->UseSprite(ArrowTile);
  27. Arrow->CSet = PortalCSet;
  28. Arrow->Step = 300;
  29.  
  30. for (int i = 1; i <= Screen->NumLWeapons(); i++)
  31. wpn = Screen->LoadLWeapon(i);
  32. if (wpn->ID == LW_ARROW)
  33. {
  34. for (int j = 1; j <= Screen->NumLWeapons(); j++)
  35. Bwpn = Screen->LoadLWeapon(j);
  36. if (Bwpn->ID == LW_BOMB)
  37. {Bwpn->X = Arrow->X
  38. Bwpn->Y = Arrow->Y }
  39. }
  40.  
  41.  
  42. // only the script with a local variable can use it,
  43. // and editing it will only effect the variable in the script it is in, not any other script.
  44.  
  45. // code goes here // Don't put code after a double slash ( // ),
  46. // as it will not work. only use double slashes for non code in the script.
  47.  
  48. //Waitframe();
  49. }
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement