|
Post by chainsawpenguin on Apr 20, 2019 0:19:31 GMT
Good evening, team! I'm trying to create a removable magazine for my pistol by copying the Rifle Reload events, and I doped out where to put the TurnOn_RifleClip and TurnOff_RifleClip Events, BUT I'm a little lost on TurnOn_HandRifleClip and TurnOffHandRifleClip. Where would I create those Events?
|
|
|
Post by Invector on Apr 29, 2019 14:50:56 GMT
It's pretty simple actually, just look at the example in the Rifle and the vShooterMelee_DemoScene and replicate.
It's basically 1 event to instantiate the rifle clip 2 events to turn on/off the clip in the weapon 2 events to turn on/off the clip on the character hand
|
|
|
Post by chainsawpenguin on May 2, 2019 7:09:02 GMT
Yeah, I get what the four Events are supposed to do:
Turn off the clip in the weapon (so it can be reloaded) Turn on the clip in the hand (as if I've just pulled it out of my belt) Turn off the clip in the had (because I'm about to...) Turn on the clip in the weapon, which is the normal state and the weapon's now ready to be fired.
What I'm not clear on is where I call events 2 and 3 (the ones associated with the hand). Like, do I create an animation event, or what?
|
|
|
Post by Invector on May 2, 2019 15:57:40 GMT
You can put an AnimatorReceiver directly to your character and call the events, no mystery there
|
|
|
Post by chainsawpenguin on May 3, 2019 7:15:36 GMT
Got it working!! If there's not already one, I can write up a tutorial on how to implement this.
|
|
|
Post by System Six Games on May 31, 2019 16:34:17 GMT
You can put an AnimatorReceiver directly to your character and call the events, no mystery there I'm trying to Instantiate the corresponding ammo clip with the right gun for the HandRifleClip on reload. Would linking objects through a list be the best way to go by this or is there a better way?
|
|
|
Post by Invector on May 31, 2019 17:48:16 GMT
Each reload animation will call the respective clip event, unless you're planning on using the same reload animation for different weapons, in this case, you could duplicate the reload state and create a new ID for your new weapon if in this scenario you have just a few weapons.
In case you have a lot of weapons, you could create a ClipManager with a list of gameObject that will activate/disable according to the currentWeapon ID or something like that
|
|
|
Post by System Six Games on Jun 1, 2019 3:37:12 GMT
Ok, thank you.
|
|