Quite a bit of help needed here...

id: 698062

category: Help with Scripts

posts: 33

Koamodo975 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!
ma33-ma 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 ma33-ma loading
I'M SORRY I'M NOT VERY GOOD AT SCRATCH BLOCKS
ma33-ma ma33-ma loading
pour le second probleme utilisez un dégradé dans le costume du sprite (un nouveau enfin je crois) fait le s'agranrire
j'ai fais comme ça pour les boucliers de ce jeu
(c'etais au tous debut)
ma33-ma ma33-ma loading
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 Koamodo975 loading

ma33-ma wrote:

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)
I'm not really sure what you mean. Could you elaborate?
ma33-ma 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 Koamodo975 loading

ma33-ma wrote:

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
Thanks!
Koamodo975 Koamodo975 loading
Gonna bump this 'cause I still need halp
Spentinium 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?
NeonG4 NeonG4 loading

Koamodo975 wrote:

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!
For your second problem, you could use the pen extension, and have data storing important infromation.
ma33-ma ma33-ma loading

Koamodo975 wrote:

ma33-ma wrote:

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)
I'm not really sure what you mean. Could you elaborate?
LOOK AT THIS PROJECT
Koamodo975 Koamodo975 loading

ma33-ma wrote:

Koamodo975 wrote:

ma33-ma wrote:

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)
I'm not really sure what you mean. Could you elaborate?
LOOK AT THIS PROJECT
AGH I meant energy BEAM
Koamodo975 Koamodo975 loading

ma33-ma wrote:

LIKE THAT?
Yes! I think I've finally got the beam part down, thanks for your help.
NeonG4 NeonG4 loading

Koamodo975 wrote:

ma33-ma wrote:

LIKE THAT?
Yes! I think I've finally got the beam part down, thanks for your help.
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=1060

Arc projectiles. Could you explain yourself further?
Koamodo975 Koamodo975 loading

NeonG4 wrote:

Koamodo975 wrote:

ma33-ma wrote:

LIKE THAT?
Yes! I think I've finally got the beam part down, thanks for your help.
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=1060

Arc projectiles. Could you explain yourself further?
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.
Koamodo975 Koamodo975 loading
Also, the first one isn't solved, ma33-ma's solution makes the characters too big/too small.
Koamodo975 Koamodo975 loading

Spentinium wrote:

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?
Up to two players only, and I haven't made any camera movement. Would probably help tho!
Koamodo975 Koamodo975 loading
Forgot to bump this
NeonG4 NeonG4 loading

Koamodo975 wrote:

Bilatedly
Upping
My topic using this
Post
Thanks for bumping, I didn't see the updated post. I'll work on an arc thing.
NeonG4 NeonG4 loading

Koamodo975 wrote:

Bilatedly
Upping
My topic using this
Post
Okydokey, I'm done. https://scratch.mit.edu/projects/877691153/
If you want any changes, let me know. (I went on a hike, sorry for the late reply)
NeonG4 NeonG4 loading

Koamodo975 wrote:

bump
Does my solution not work?
-TUB- -TUB- loading
Zooming:

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 Koamodo975 loading
Still need help here
NeonG4 NeonG4 loading

Koamodo975 wrote:

Still need help here
With what?
Koamodo975 Koamodo975 loading

NeonG4 wrote:

Koamodo975 wrote:

Bilatedly
Upping
My topic using this
Post
Okydokey, I'm done. https://scratch.mit.edu/projects/877691153/
If you want any changes, let me know. (I went on a hike, sorry for the late reply)
srry didn't see your post
I mean, it curves, yeah, but it doesn't seem to aim…
Koamodo975 Koamodo975 loading
THIS AIN'T A NECROPOST I LOST THE COM FOR LIKE FIVE MONTHS
Just bumping
Koamodo975 Koamodo975 loading
Blasting this topic
Upwards
Making it the first
Post
NeonG4 NeonG4 loading

Koamodo975 wrote:

NeonG4 wrote:

Koamodo975 wrote:

Bilatedly
Upping
My topic using this
Post
Okydokey, I'm done. https://scratch.mit.edu/projects/877691153/
If you want any changes, let me know. (I went on a hike, sorry for the late reply)
srry didn't see your post
I mean, it curves, yeah, but it doesn't seem to aim…
I see. You want the projectile to aim for a point, and curve toward it.

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 Koamodo975 loading
Bozo
Ungulates*
Master
Pasta
(bump)
*An ungulate is a hoofed mammalian creature, like a horse, or cow.
Koamodo975 Koamodo975 loading
Funky
Olive
Muffins
Outshine
Obnoxious
Pull
Up
Pants
bump


I don't know, okay? I DON'T EVEN KNOW.