well I think so because that would be a boolean value and lets say you make an animation play when you click the dash button maybe you don't want the player to preform another action that's why the IsDashing could be set to true and you could check if the value for some reason I don't know what you would want but you could 100% do that
#Is it important to create object values such as "isDashing", "isAttacking" ?
48 messages · Page 1 of 1 (latest)
and for the the object or script part it is up to you but I would just set it as a _G value
but remember don't try to add something that is not needed if a debounce is all you need for the script then just write that code
it depends
if you want to make a complex combat and have high diversity of moves
and want a very dynamic movementation and combat
you will need those
me, for example, in my pvp game
I use a number value called "Combo" to count if it's the 1st, 2nd, etc., punch. with that, people can't just do 3 punches, switch to a weapon, and repeat it
a bool value called "StartingUp" which is for so you can dash while a certain duration of your move
it has to do with the animation in this case too
for example, you can dash 0.5 seconds before doing a move called "Earth Toss"
** You are now Level 8! **
and also sprint
which makes the movementation more dynamic and complex
another 0.5 seconds of that move I use the bool value called "Attacking"
it's for so you can't use other moves while you're using that one and also so you can't dash for that
which is also a nerf for how OP movementation is
also, I used to use SetAttribute() to do stuns. trust me: don't do that. with bool values, if there are many attacks coming at you, there can be many stun values inside the character, and you can just do FindFirstChild() do delete them. with attributes, there can't be more than one of the same attribute; I had to make many stun attributes to fix the overlapping issue
bool values saved my life for stuns
I mean all you have to do is make a bool value assign it as a global var then whenever you want to check if the player is currently in a battle animation or is fighting you could just check it
** You are now Level 8! **
you will need a way to manage the mechanics of your game, basically
and those aren't only bool values really, but it's the best I found for me
mainly because of the stun overlapping issue
Or if not comfortable with that you can assign the value to the player in a player joining handler
wdym? like a folder/settings with values inside to handle the states?
yeah that works too
That would be the most efficient instead of an attribute in my opinion but both work
And I would put maybe a function in a module script checking for the isattacking or whatever because I would imagine other things may want that information
yes, attributes suck at that
I mean I really don’t use attributes in the first place because you can just organize the code using oop
That's what I did but only for "canDash", "canRun".
Normally I avoid adding a lot of objects because I'm afraid that over time my game will become too laggy. I also made all my system of movements in only two scripts.
But thank you for all your help, it will help me a lot for the future, I better understand the importance and the alternatives to bool values
I never seen much really. values have been the most efficient as I know
there are tags, attributes, values
I don't know what more
Rn I have bools values into my script but not into an object. So I can't get these values for another script
I mean, it's literally the purpose of values
communicating between different scripts
wdym?
I use FindFirstChild() to, for example, check if a character is stunned before using a move
well those are what modules and _
G values are for
it's in values description
modules too
you can do a general table in a module and access it too
I used that for like 3 days