Is there any way to attach particle effects to enemy's animation? - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html) +--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html) +---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html) +---- Thread: Is there any way to attach particle effects to enemy's animation? (/thread-30544.html) |
Is there any way to attach particle effects to enemy's animation? - DarkPearStudios - 09-12-2015 Hello everyone! So, I want to know if is there a way to attach a particle effect to an enemy animation. More specifically, the attack animation. And if there's a way to delay the particle effect. Explaining better, when the animation starts, it takes like 0,5 seconds to the attack really happen, so I want to know if there is a way to delay the particle effect and that it just spawn in the right time. Thanks! Gabriel. RE: Is there any way to attach particle effects to enemy's animation? - Neelke - 09-12-2015 I don't think so. You can attach a particle to the enemy directly, but it doesn't update with the enemy's movement later on, making it look completely awful. You can try to experiment with it if you wish, but if you attach it directly, it's gonna stay there forever with the enemy. RE: Is there any way to attach particle effects to enemy's animation? - Romulator - 09-12-2015 Is the animation needing to happen when it hurts the player? Or regardless of whether it touches the player or not? If that's the case, you might be able to make something happen with AddEntityCollideCallbacks, but as Neelke above me states, attaching the particle doesn't update with movement. RE: Is there any way to attach particle effects to enemy's animation? - DarkPearStudios - 09-12-2015 Well... The particle should spawn every time that the attack animation plays for hurt the player. Example: You're being chased and the enemy gets near you and then he hurts you. The particle should spawn when the enemy hurts you. RE: Is there any way to attach particle effects to enemy's animation? - Romulator - 09-12-2015 I threw this together in about 10 minutes. It may or may not work; it is untested, but it gives you a general idea of what I would do if it does work. PHP Code: //Make sure to read over this code. I didn't test it, so there is probably mistakes. RE: Is there any way to attach particle effects to enemy's animation? - The chaser - 09-12-2015 Humm I actually did this with a monster of mine, you can attach particles to the monster bones, and the particles will move along with it, as far as I know. Dunno if this is what you are currently searching, I hope I helped tho RE: Is there any way to attach particle effects to enemy's animation? - Traggey - 09-12-2015 This belongs in the development support forum, I have moved the thread. RE: Is there any way to attach particle effects to enemy's animation? - DarkPearStudios - 09-13-2015 (09-12-2015, 03:25 AM)Romulator Wrote: I threw this together in about 10 minutes. It may or may not work; it is untested, but it gives you a general idea of what I would do if it does work. Hi, Thanks for this code. I will send this code to the programmer of the mod that I'm working. The mod is Subconscientia, If you want to take a look. Then he sees if it works. Although I don't think that my idea would be possible without modifying the engine. (09-12-2015, 02:52 PM)The chaser Wrote: Humm I actually did this with a monster of mine, you can attach particles to the monster bones, and the particles will move along with it, as far as I know. Dunno if this is what you are currently searching, I hope I helped tho Hello. I don't think that attaching the particle to the bones would work. I was trying to do this with the pigs, to make them vomit instead of the common attack animation (I wrote attack animation for the people undestand.) but the vomit animation is not helping. I know how to make a "scene" with the pig vomiting, but to make this as an attack... I think it's not possible. I have been in a LONG conversation with Peter Howeel, the co-designer of AAMFP, to talk about the development of Pigs and changes made during it. ( he explained some changes) and I asked him about attaching the particles to the pigs and this was his answer: "The particles being attached to the pig animations was hardcoded into the engine, so it isn't accessible through script. I'm not a programmer so I don't know the technicalities of it I'm afraid! " But I will see what I can do. But thanks for your reply! RE: Is there any way to attach particle effects to enemy's animation? - Romulator - 09-13-2015 No problem. Feel free to PM me later if you need help with other stuff, or of course, make a forum post. Most, if not all of us would be glad to help |