#zeuschrist0836
1 messages · Page 1 of 1 (latest)
ye
ok well heres my set up
now I don't really know what youre doing, I just opened your code and pointed out the non-logic that i saw
ok np
so im trying to get flicker jab to play, then flicker jab 3, then flicker jab_2. (i messed up the names). so basically trying to get a 1>2>3 combo while having it reset if the player stop pressing the mouse0
so while you hold mouse0, you want it to go 1>2>3
no while clicking i want it to go 1>2>3
EDIT: I wrote this for continuous mouse hold, not clicking
You could do this like this:
- Add a bool to your Animator controller, call it "Attacking" for example.
- In your Update, do
animator.SetBool("Attacking", Input.GetMouseButton(0)); - Make transitions from attack to the next, and add a condition where
Attackingis true. Add another exit transition ifAttackingis false
NOTE: Use GetMouseButton not GetMouseButtonDown. The latter one only returns true ONCE on the frame that you press the key.
In this case you want to see if it's continuously held down, and should use GetMouseButton or GetKey
(I see you were usingInput.GetKeyDown(KeyCode.Mouse0), you can just use GetKey)
clicking or holding??
clicking. kinda like ssbu if that makes any sense
or do u think triggers would be better? i only did bool cause someone said bools would work better
I'm thinking you might wanna use Triggers
just remember to use animator.ResetTrigger() if you need to cancel a trigger
Yeah go with trigger
If youre dealing with single clicks, trigger is better
ok so i know for sure triggers are better.
cool cool, progress. thanks
yeah I didn't mean 3 bools lol
just 1
i was showing u this example
forgot to hit send..
lol yeah thats exactly what im trying to do
oh wait but thats holding isnt it? im trying to tap for each rather than hold
do u wanna tap once ?
or while is playing
u have to tap 3 times?
you gotta be specific
while playing i have to tap three. like if i tap once it goes from idle to jab then if i tap again it goes from jab > jab 3 and tap and jab 3 > jab 2
hold/tap just depends on if you use GetButton or GetButtonDown, as i described
right
i wasnt gonna ask until i found something similar tomake an effort but i keep getting trigger colliders for some reason. how do i go about having the triggers activate one after another?
do you mean trigger conflicts? (trigger collider is a different concept)
try this
if you are using multiple triggers, use ResetTrigger on the ones you dont want
to make sure they are false
ok ill try that ty
also I'm pretty sure you can just use one trigger for these all, instead of like 3 separate triggers
oh for real? ill look into that too
yeah, well, every time you use a trigger, it gets set to false, so you can use it in the next transition
(still need separate Transitions ofc, but you can reuse the same trigger parameter)