#navarone the goat
1 messages · Page 1 of 1 (latest)
alr let me see the setup and you still didnt explain what the purpose of this animation is
because from what you describe if you spawn a prefab wouldnt PlayOnAwake be sufficent ?
Okay so basically everytime this button is clicked two animtions occur the tenticle and water
But I want the water to animate ONLY when it pops out the of pipe
Sure I guess
I can test it out
public bool or trigger?
wait
is the water prefab?
im confused
thought u kept spawning it
myb so what is wrong putting the Play transition in the button again
Yeah it is
Theres 4 objects that I want spawned one after another
but let's say a water spawns out the pipe and I click glass
it does the glass animation where glass enters the bin
when does glass enter bin
so you dont want it on the button click but when it enters?
or
I want it on button click but I don't want it to display if it isn't in the scene view
Or hierachy
it shouldnt no ?
Right now when the game starts they all automatically animate and go into their bin
I want them to spawn and when I click the button they animate and disappear
ok yeah so call the SetTrigger
you probably also need transition to go back to empty state with no params (just exit time)
Okay thank you
I think you can directly just do it in the inspector like this
or whatever you called your parameter for transition
Still..
But it is spawning in and not instantly falling into the trash
how many times are you clicking it
could be issue with trigger
any way to fix it?
youd have to use some code to make sure it isn't already playing
this would be much simpler with code
Hm Ok
I tried doing this with event orders
but that just completely removes it
mb wrong vid
I want the cloned object to animate just like what happens when I click the button
I tried doing this with event orders
video is very laggy hold up..
wdym event orders?
Like an event order in the animation where the object deletes itself
I don't want it to to delete though
the video is laggy but not the problem lol I still dont know what is the relation beteen the animations and the buttons
just trying to understand
Animation plays once button is pressed
But the animation doesn't play on the instantiated object..
yes because ur referencing the something else
another animatorthat isnt the spawned object
Yeah someone told me to do an add.component with the instantiate script
nah
just add a method to the object
and when the method runs it controls its own animator
How do I do that
All I'm doing is instantiating a prefab and I'm trying to add an animation to it
yeah mate you're gonna have to go through some basic courses
this will be a lot to explain references lol
🫡
Alright
(I have one day to learn this and its 1 AM rn) 🔥
ScriptOnTheObject myInstance = Instantiate(prefab etc..)
myInstance.PlayAnimation();```