Quite a bit of help needed here...
id: 698062
category: Help with Scripts
posts: 33
Koamodo975
loading
Yo, wassup Scratchers. You see, I'm working on a big project, a DBZ-inspired fighting game, and I need some help with the scripts. These are the things I need help with here:
-In the game, when a character moves away from another character, I want the characters to get smaller(as if the screen is zooming out). If the zoom reaches it's max and a character is still moving back, the other character moves forward(on the X axis). This should only work on the X axis tho. Anyone ever done this before?
-Like I said before, my game's gonna be DBZ-inspired, so that means ki attacks. How do I code an energy wave that extends as you shoot, but isn't made with costumes or clones? The whole beam needs to be able to damage the opponent as well, so keep that in mind. Solved
-This one's pretty simple: Does anyone know how to code projectiles that arc towards the opponent, like a halfway boomerang? I mean arc path as in like a parenthesis symbol (The projectile follows the curve path, the farther the enemy, the less intense the arc)
-How do I create a screenshake effect? For transformations and stuff.
Thanks for taking the time to read this. You won't regret it when I release the game!
-In the game, when a character moves away from another character, I want the characters to get smaller(as if the screen is zooming out). If the zoom reaches it's max and a character is still moving back, the other character moves forward(on the X axis). This should only work on the X axis tho. Anyone ever done this before?
-Like I said before, my game's gonna be DBZ-inspired, so that means ki attacks. How do I code an energy wave that extends as you shoot, but isn't made with costumes or clones? The whole beam needs to be able to damage the opponent as well, so keep that in mind. Solved
-This one's pretty simple: Does anyone know how to code projectiles that arc towards the opponent, like a halfway boomerang? I mean arc path as in like a parenthesis symbol (The projectile follows the curve path, the farther the enemy, the less intense the arc)
-How do I create a screenshake effect? For transformations and stuff.
Thanks for taking the time to read this. You won't regret it when I release the game!
ma33-ma
loading
FOR YOUR FIRST PROBLEM HERE IS WHAT I OFFER[scratchblock
s]
forever
set size to (((distance maxi) - (distance to [other sprite v]))v]) %
if <[ditance maxi] < (distance to [other sprite v])> then
point towards [other sprite v]
move (10) steps
end
end
ma33-ma
loading
I'M SORRY I'M NOT VERY GOOD AT SCRATCH BLOCKS
Koamodo975
loading
I'm not really sure what you mean. Could you elaborate? for the second problem use a gradient in the costume of the sprite (a new one finally I believe) makes it bigger
I did like this for the shields of this game
(it was at the very beginning)
ma33-ma
loading
for the last problem use this
repeat until <touching [enemie v] ?>
set [dir1 v] to (direction)
point towards [enemie v]
set [dir v] to (direction)
point in direction (((dir) + (dir1)) / (2)
move (10) steps
end
Koamodo975
loading
Thanks! for the last problem use thisrepeat until <touching [enemie v] ?>
set [dir1 v] to (direction)
point towards [enemie v]
set [dir v] to (direction)
point in direction (((dir) + (dir1)) / (2)
move (10) steps
end
Koamodo975
loading
Gonna bump this 'cause I still need halp
Spentinium
loading
For the first one, did you implement zooming and can you move the camera? Just wondering.
Also, are there going to be up to 2 players or any amount of players?
Also, are there going to be up to 2 players or any amount of players?
NeonG4
loading
For your second problem, you could use the pen extension, and have data storing important infromation. Yo, wassup Scratchers. You see, I'm working on a big project, a DBZ-inspired fighting game, and I need some help with the scripts. These are the things I need help with here:
-In the game, when a character moves away from another character, I want the characters to get smaller(as if the screen is zooming out). If the zoom reaches it's max and a character is still moving back, the other character moves forward. Anyone ever done this before?
-Like I said before, my game's gonna be DBZ-inspired, so that means ki attacks. How do I code an energy wave that extends as you shoot, but isn't made with costumes or clones? The whole beam needs to be able to damage the opponent as well, so keep that in mind.
-This one's pretty simple: Does anyone know how to code projectiles that curve at the opponent, like a missile with horrible aiming?
-How do I create a screenshake effect? For transformations and stuff.
Thanks for taking the time to read this. You won't regret it when I release the game!
ma33-ma
loading
LOOK AT THIS PROJECTI'm not really sure what you mean. Could you elaborate? for the second problem use a gradient in the costume of the sprite (a new one finally I believe) makes it bigger
I did like this for the shields of this game
(it was at the very beginning)
Koamodo975
loading
AGH I meant energy BEAMLOOK AT THIS PROJECTI'm not really sure what you mean. Could you elaborate? for the second problem use a gradient in the costume of the sprite (a new one finally I believe) makes it bigger
I did like this for the shields of this game
(it was at the very beginning)
Koamodo975
loading
THAT?Yes! I think I've finally got the beam part down, thanks for your help. LIKE
NeonG4
loading
It looks like your first and second problems are solved. For a screenshake, I'm unsure. However, I believe griffpatch's space shooter game has a section on it! https://youtu.be/RKdXM3x-jEo?t=1060THAT?Yes! I think I've finally got the beam part down, thanks for your help. LIKE
Arc projectiles. Could you explain yourself further?
Koamodo975
loading
I mean instead of the projectile going straight towards the target, it aims at an angle and then curves toward the target. For example, if the target is at 0 degrees relative to the character, the projectile would aim at, say, -30 degrees, then curve around to the opponent. Sorta like a boomerang that doesn't come back.It looks like your first and second problems are solved. For a screenshake, I'm unsure. However, I believe griffpatch's space shooter game has a section on it! https://youtu.be/RKdXM3x-jEo?t=1060THAT?Yes! I think I've finally got the beam part down, thanks for your help. LIKE
Arc projectiles. Could you explain yourself further?
Koamodo975
loading
Also, the first one isn't solved, ma33-ma's solution makes the characters too big/too small.
Koamodo975
loading
Up to two players only, and I haven't made any camera movement. Would probably help tho! For the first one, did you implement zooming and can you move the camera? Just wondering.
Also, are there going to be up to 2 players or any amount of players?
Koamodo975
loading
Forgot to bump this
NeonG4
loading
BilatedlyThanks for bumping, I didn't see the updated post. I'll work on an arc thing.
Upping
My topic using this
Post
NeonG4
loading
BilatedlyOkydokey, I'm done. https://scratch.mit.edu/projects/877691153/
Upping
My topic using this
Post
If you want any changes, let me know. (I went on a hike, sorry for the late reply)
Koamodo975
loading
bump
NeonG4
loading
Does my solution not work? bump
-TUB-
loading
Zooming:
Arc projectiles:
Screen Shake:
set [scroll x v] to (((p1x) + (p2x)) / (2))
set [scroll y v] to (((p1y) + (p2y)) / (2))
set [scroll size v] to ((20000)/((p1x) - (p2x)))
if <(scroll size) > (100)> then
set [scroll size v] to (100)
end
define go to x: (x) y: (y)
go to x: (((scroll size) / (100)) * ((x) - (scroll x))) y: (((scroll size) / (100)) * ((y) - (scroll y)))
set size to (scroll size)
Arc projectiles:
define init arc projectile
set [xv v] to (((p2x) - (p1x)) / (30))
set [yv v] to ((((p2y) - (p1y)) + (450)) / (30))
define tick arc projectile
change [x v] by (xv)
change [y v] by (yv)
change [yv v] by (-1)
Screen Shake:
set [intensity v] to (60)
repeat (60)
change [scroll y v] by (([e^ v] of (((intensity) - (60)) * (0.1))) * ([cos v] of (((intensity) * (45)) * (20))
change [intensity v] by (-1)
end
Koamodo975
loading
Still need help here
NeonG4
loading
With what? Still need help here
Koamodo975
loading
srry didn't see your postBilatedlyOkydokey, I'm done. https://scratch.mit.edu/projects/877691153/
Upping
My topic using this
Post
If you want any changes, let me know. (I went on a hike, sorry for the late reply)
I mean, it curves, yeah, but it doesn't seem to aim…
Koamodo975
loading
THIS AIN'T A NECROPOST I LOST THE COM FOR LIKE FIVE MONTHS
Just bumping
Just bumping
Koamodo975
loading
Blasting this topic
Upwards
Making it the first
Post
Upwards
Making it the first
Post
NeonG4
loading
I see. You want the projectile to aim for a point, and curve toward it.srry didn't see your postBilatedlyOkydokey, I'm done. https://scratch.mit.edu/projects/877691153/
Upping
My topic using this
Post
If you want any changes, let me know. (I went on a hike, sorry for the late reply)
I mean, it curves, yeah, but it doesn't seem to aim…
I modified it, but I can't find the proper formula to modify the outgoing angle for the trajectory to land on a given x and y position. Sorry.
Koamodo975
loading
Bozo
Ungulates*
Master
Pasta
(bump)
*An ungulate is a hoofed mammalian creature, like a horse, or cow.
Ungulates*
Master
Pasta
(bump)
*An ungulate is a hoofed mammalian creature, like a horse, or cow.
Koamodo975
loading
Funky
Olive
Muffins
Outshine
Obnoxious
Pull
Up
Pants
bump
I don't know, okay? I DON'T EVEN KNOW.
Olive
Muffins
Outshine
Obnoxious
Pull
Up
Pants
bump
I don't know, okay? I DON'T EVEN KNOW.