#💬 xulvilʹs Feedback

1 messages · Page 1 of 1 (latest)

tribal ironBOT
wise wolf
#

@cosmic ingot if you dont mind me asking, how did you script the vfx?

#

not the actual code

#

the structure

cosmic ingot
#

@sullen radish

#

he scripted it

sullen radish
# wise wolf the structure

broke it down into a few sections

obviously you have the animation events

  • leg steps backwards [FIRST]
  • projectile shoots out [SECOND]

on each of these animation events i made functions for what would happen, for example on the first one where the leg steps backwards, i need to emit the VFX, so i made it. i need to spawn the VFX from the path so i made a function there and combined the two of them into one that handles it easily so all i have to do is call one function, provide it the path to the smoke, and the part/attachment it should be parented to it and it handled it all for me

additionally we also have the charging effect, aura, blue overlay, and FOV changes. the first two were done pretty easily using the function above so nothing else there. the latter two were handled fairly easily by using a tween

the rest of the code follows a similar path, like the 2nd animation event has the projectile, FOV change (again), and more

the projectile itself uses a tween to move forward while running a RunService connection to check for collisions below using raycasts (which is a function) and then randomizes size, rotation, and direction. the connection also checks in front of the projectile for any collisions so it doesn't just phase through a wall

afterwards, if there's a collision or the tween makes it to the end i call a function to explode the part, play the impact frames, and clean up everything once all the particles have disappeared

wise wolf
sullen radish
wise wolf
sullen radish
#

you will always start on the client either way, so not much you can do there

#

most people will play it on the client end and fire to the server

#

any movement/ability should generally be handled on the client otherwise you're going to get latency which for fast paced combat games is a massive no

#

you should take as much anti-exploit measures as you can but you'll have to cut your losses when it comes to making your game feel good

wise wolf
#

yeah here

#

this is me trying out replication

#

Just that attack takes a giant chunk inside the server side replicator, which gets really messy

sullen radish
#

you can also look at some tutorials and see how they handle it

wise wolf
sullen radish
#

you should be limiting as many calls as you can since that's where more delay comes from and you'll eventually hit the limit

wise wolf
#

ive been thinking of um

#

the server side of the attack to be done in a modular script that is then just required

#

making it really organised

#

then a OOP based hitbox/replication system i can use

sullen radish
# wise wolf well how do i do that?

easiest way is pretty much just having the effect play on the client side, sending it to the server to replicate to other clients (you can limit it here by only doing those nearby, in a specific area, or wtv) and then playing the effect entirely on their end

#

as for the damage, cooldowns, and more backend stuff, that should all be on the server anyway

#

so there shouldn't be a need to replicate that

wise wolf
wise wolf
#

but yeah alr ig

#

thanks winter!

sullen radish
#

mhm, best of luck

wise wolf