Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import "std.zh"
- int ArrowTile;
- int BombTile;
- int LinkDir;
- //Put constants here.
- //Put Global Variables here (Variables that ALL scripts in the quest use can use,
- //and editing it will effect all scripts using these variables Be careful).
- item script PortalGun //'ffc' can be 'item' or 'global', too.
- {
- void run(int d1, int d2)
- //while(true) //Most often used loop.
- {
- // Put Local Variables here.
- ArrowTile = d1; // The tile of the Portal
- BombTile = d2; // Do I even..
- LinkDir = Link->Dir;
- lweapon Arrow = Screen->CreateLWeapon(LW_ARROW, Link->X, Link->Y);
- lweapon Bomb = Screen->CreateLWeapon(LW_BOMB, Link->X, Link->Y);
- Arrow->Dir = LinkDir;
- Arrow->Damage = 4;
- Arrow->UseSprite(ArrowTile);
- Arrow->CSet = PortalCSet;
- Arrow->Step = 300;
- for (int i = 1; i <= Screen->NumLWeapons(); i++)
- wpn = Screen->LoadLWeapon(i);
- if (wpn->ID == LW_ARROW)
- {
- for (int j = 1; j <= Screen->NumLWeapons(); j++)
- Bwpn = Screen->LoadLWeapon(j);
- if (Bwpn->ID == LW_BOMB)
- {Bwpn->X = Arrow->X
- Bwpn->Y = Arrow->Y }
- }
- // only the script with a local variable can use it,
- // and editing it will only effect the variable in the script it is in, not any other script.
- // code goes here // Don't put code after a double slash ( // ),
- // as it will not work. only use double slashes for non code in the script.
- //Waitframe();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement