So instead of just repeating the same punch animation i want it to do other ones to create one long combo. Anyone can give me an idea of where to start or a guideline of what to do?
COMMUNITY QUESTION
How do i make my combat system into a multi hit combo and not just one punch animation?
1 answer
You can use a variable to track what punch you are on
so like make a variable called punchCount = 1
and then change your script to a bunch of:
if punchCount == 1 then
-- punchy script number 1
if not punchCount <= 5 then -- change the number after "<=" to the amount of different punches in ur combo
punchCount = punchCount + 1
else
punchCount = 1
end
end
if punchCount == 2 then
-- punchy script number 2
if not punchCount <= 5 then
punchCount = punchCount + 1
else
punchCount = 1
end
end
if punchCount == 3 then
-- punchy script number 3
if not punchCount <= 5 then
punchCount = punchCount + 1
else
punchCount = 1
end
end
if punchCount == 4 then
-- punchy script number 4
if not punchCount <= 5 then
punchCount = punchCount + 1
else
punchCount = 1
end
end
and so on
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
idk if this would work but try setting a local variable named combo and said it equal to one. then in the script do if combo = 1 then combo = 2, load punch1 animation, else if combo = 2 then combo = 3, load punch2 animation. So on and so forth