edited March 2014 in ORK Support
GiL, is there a way to change a variable when I'm equipping a weapon and change it again when I unequip that weapon?
For some reason, when I'm shooting a gun, I couldn't get the sparks and the gun to match. Sometime when I'm running, the sparks will not be in sync with the tip of the gun, so I came up with a different solution. I just went into my 3d modelling program and added the gun itself and the sparks spawner alongside with the character.
I turned off the equipment viewer and disable the gun's skinned mesh renderer. I got a global event that will check to see if I am currently equipping the gun and if I am, to enable the skinned mesh renderer of the gun. That works fine. But now the global event will keep checking every 1 secs. I don't need that, so I added a variable condition to the global event, making the event execute only when the bool variable AA is true. The problem is that there's no way to change the variable to make it true. In my gun weapon section, there's no change variable upon equipping the gun. Do you know a way to do it?

Edit: Solved
Post edited by Shadow_Fire on
  • Currently not possible - but if you want to get the sparks to a different place of each gun, why don't you add a child object to the gun's prefab and use the child object for spawning the spark in the events?
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • That works perfectly! Originally, I thought of that too, but I couldn't figure out how to do it so I thought it couldn't be done. Gave it another go since you mentioned it and I got it to work.
    Thanks GiL.
Sign In or Register to comment.