Shoot beam, no stab
#1
Posted 26 October 2008 - 08:27 AM
#2
Posted 26 October 2008 - 08:39 AM
Is there any reason for it to be a sword beam?
#3
Posted 26 October 2008 - 09:12 AM
So all in all, I need a weapon that only shoots projectiles, uses the A button and... that's it. I do want the player to not shoot projectiles constantly. Like 5 seconds(300 frames) between shooting.
#4
Posted 26 October 2008 - 09:29 AM
#5
Posted 26 October 2008 - 09:38 AM
So you'll make this? I would be very grateful. Of course you'll get credited.
#6
Posted 26 October 2008 - 09:44 AM
void run(int tile, int cset, int aframes, int aspeed, int damage, int speed){
lweapon projectile = Screen->CreateLWeapon(LW_SCRIPT1);
projectile->OriginalTile = tile;
projectile->Tile = tile;
projectile->CSet = cset;
projectile->NumFrames = aframes;
projectile->ASpeed = aspeed;
projectile->Dir = Link->Dir;
projectile->Damage = damage;
projectile->Step = speed*100;
int x; int y;
if(Link->Dir>1) x = (((Link->Dir-2)*2)-1)*8;
if(Link->Dir<2) y = ((Link->Dir*2)-1)*8;
projectile->X = Link->X+x;
projectile->Y = Link->Y+y;
Link->Action = LA_ATTACKING;
}
}
Just set to the action script for the item.
- D0 : Tile for projectile to use
- D1 : CSet
- D2 : Number of frames of animation
- D3 : Animation speed
- D4 : Damage
- D5 : Speed
#7
Posted 26 October 2008 - 09:46 AM
#8
Posted 26 October 2008 - 09:48 AM
I thought when you used an item script it had a built-in break already?
I can do that, but it'll mean using some global functions which would be a bit of a pain...
'frames' isn't a unit you can use for speed. Distance is in frames.
Speed is in 'Pixels per frame', and yes, the speed is in pixels per frame.
#9
Posted 26 October 2008 - 10:05 AM
So pixels/frame it is, not just pixels. I will try out some things, then post here what I've found out.
#10
Posted 26 October 2008 - 10:06 AM
I think it should work ok.
#11
Posted 26 October 2008 - 10:24 AM
Also, I asked for the item to use the a button, but I decided I wanted to have that rule to make it able that you can select items for both A and B anyway.
#12
Posted 26 October 2008 - 10:26 AM
#13
Posted 26 October 2008 - 10:29 AM
Edit: I put it in myself now, should work.
Thanks for you help, I will put you on the credits list.
Edited by Twilight_Knight, 26 October 2008 - 10:33 AM.
#14
Posted 26 October 2008 - 10:31 AM
Put that line in then, yeah.
#15
Posted 26 October 2008 - 10:33 AM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users