Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
Is there any better way than creating a camera for each gun? In simple words i mean is there a way to make more than one guns. |
||||
|
You can create as many guns as you want.... Just use variable to trigger an action... Show and hide node... But first you have to make all the guns children node to the player... If player is aninated object attach them to the aninated joint... And make all other weapons hidden and as per gameplay... Use the variable show and hide them .... There are many ways to do this... |
||||
|
I finished creating an example for you before I noticed just_in_case's answer. He's faster than a lizard. Here's my example: https://drive.google.com/file/d/... I chose to disable collisions for the inactive weapon and enable collisions for the active one, so you can learn from that and be able to use weapons of different sizes because the collisions of the inactive ones won't affect the game. |
||||
|
Am faster than a lizard...... Hahaahah lolz.,.. by the way good example @Wild-master |
||||
|
But I want guns that have different damage like: Pistol = 30 demage with 2 s fire rate AK 47 = 50 demage with 0.05 s fire rate M4 Carbine = 70 demage with 0.01 s fire rate This is just an example don't mind if they are wrong! |
||||
|
You can use variables for that too... For example if a variable ak47 is 1 then do something.... And create another shoot action with faster bullet speed and high damage... Remember you should apply the shoot behavior to the same node as of your gun... For example suppose you have a gun scenenode named pistol which is attached to the playernode as a children... And you have already applied the behaior or action to make that gun appears and when the gun appears you have to set a variable "pistol" (can be anything) Now you need to apply when a key prrssed down than do something to the pistol node... And then add action if a variable " pistol" is 1 then do something... And then add another action shoot... And apply the setting as you want... Use same thing with other weapons too.... |
||||
|
Thanks for the answer just_in_case. But i think I didn't understood it well so please give me an example of it so I can understand it great! |
||||
|
Hmmm here is the example file.... You can change the weapons by pressing 1,2,3 and can see the diffrence in bullet speed... And if you add an enemy in the provided cxb.. You will notice that shooting the enemy with diffrent weapons will cause diffrent damage to him.... Hope you will now undertand the method to do this... https://drive.google.com/file/d/... |
|