I have a sword, and i make it swing every 0.8 seconds using a timer. I also want to spawn an object when the sword swings and have it move forward and get more opaque until its invisible. No idea how to do this.
Add the tween behavior to the object you want to create. Add the object when triggered. Set the opacity to zero and create an opacity tween to tween the opacity to 255 over a set number of milliseconds. It’s good practice to delete the tween when it’s done playing.
Edit: I’m not sure if you want to make it visible or invisible because “opaque” means “not transparent” but you also said invisible.
If you want it to disappear then set the tween to opacity value to 0 instead of 255 and you can check the box that says something like delete when done and skip the tween has finished event. By default the opacity is 255. So, you wouldn’t need to change it before the tween.
thanks! this worked exactly how i wanted!
im stupid lol i forgot that opaque means not invisible
Don’t worry, i had to Google the word myself because i wasn’t positive. It’s not a word that comes up in daily conversations. All good.