I need help because I don’t know how to made it so he holds a blaster to blast the slimmes
Use the projectile from vx and vy block and drag it to the on start editor then you will make a sprite throw a blaster or slime sprite, in the from right beside you will see a red circle parameter, click on it and click it or the drop down menu arrow beside it and then you will see a bunch of variables in the menu, click the one from your player sprite’ you created and set it as the sprite’ threw the slime projectile. In the right side beside the vx you see a number parameter, type a value for the speed for the velocity x, and thee right side tex of vy, there is a other number parameter meant for its velocity y, now use both parameters then you now throw a sprite by the velocity speed of the projectile, it does not need to be both directions, if just horiztonal, use 0 for vy and vx your speed, if it is vertical, then vx is 0, and then vy is your value, but never set both to 0 then it will not be able to move.
Put the blaster somewhere on the ground if he has to collect it then make it so that:
if sprite of kind Player overlaps with sprite of kind [Food, Blaster (you can make a new category for the blaster alone)] {
set sprite image to [sprite holding blaster]
}
If he starts with a blaster just have his sprite hold it from the start
In either case I’d suggest then doing either one of these:
on A button pressed {
set [slime] to sprite of kind [new kind]
set [slime] x to mySprite x
set [slime] y to mySprite y
set [slime] velocity to [whatever you want]
}
or
on A button pressed {
set [slime] to sprite of kind projectile from [mySprite] with velocity [whatever you want]
}
I recommend the first though because it is type specific and therefore will not correspond to any other projectiles
You should do drag the on overlap block to the editor and then make the 2nd kind as the Blaster SpriteKind and also make the blaster sprite’ set its kind as to the blaster kind, first go and select a new kind by clicking on the SpriteKind drop-down menu or just click the SpriteKind circle parameter, then type in what you want it to be, do it after you dragged the set kind to block, lastly, make the slime sprite’ projectile created when you press the a button and use the set image to that variable you want or made, that is it.
I mean use the set image to block and then set the variable by clicking the red circle or down arrow and selecting the variable your projectile is called as the set image as the parameter for the block.