lala
New vMember
Posts: 22
|
Post by lala on Jul 4, 2017 8:33:06 GMT
Hi there, I am pretty new to Scripting and stuck here for " Activating and Deactivating XWeaponTrail " for my weapon. Currently , my character got trail popping even when he is running/ walking. I don't want my trail to be popping out while the character is running / walking , i just want his weapon trail to be only activated when he make his sword slashes. I really need help for Activating and Deactivating that trail .
In the XWeapon Trail Readme folder it is stated......
"API: Activate(): Activate trail Deactivate(): Stop trail immediately StopSmoothly(float fadeTime): Stop trail smoothly. *NOTE YOU NEED TO IMPORT THE NAME SPACE, for example, using Xft; in C#*
I just don't know how to put all things together .
Thank you all. !!
|
|
|
Post by uberwiggett on Jul 4, 2017 10:31:44 GMT
have a look at the controller and weapon scripts, they have sections that allow you to call things on events, such as "on hit" and pretty sure on attack, you can use that to activate and deactivate the script that controls the trail so it's only active during the attack animation. Or perhaps look at the attack anim in the anim controller it might have something there so it only activates during the animation.
|
|
|
Post by tharindu on Jul 6, 2017 5:15:32 GMT
have a look at the controller and weapon scripts, they have sections that allow you to call things on events, such as "on hit" and pretty sure on attack, you can use that to activate and deactivate the script that controls the trail so it's only active during the attack animation. Or perhaps look at the attack anim in the anim controller it might have something there so it only activates during the animation. Take a look at shadex 's magic system addon. It essentially enables particle trails in an animation state behavior. Sounds similar to something you might need.
|
|