Unity Ninja Unity 3D Forum
To have exclusive access to all downloads, recourses and links within this forum, a free registered account is required. Just a heads up Wink
Share
Go down
Member [Lv. 2]
Member [Lv. 2]
Posts : 12
Points : 1354
Rep : 1
Join date : 2014-12-01
Age : 17
Location : Long Beach, CA
View user profile

Weapon Switching Script

on Thu Jan 22, 2015 1:42 pm
I found this excellent script, I didn't make.
[You must be registered and logged in to see this link.]

If anyone is wondering...... you have to create an empty and sometime has to rotate the empty, put the script and then drag what guns you want



Cool
avatar
Admin
Admin
Posts : 608
Points : 3169
Rep : 406
Join date : 2013-12-11
Age : 21
View user profilehttps://www.youtube.com/user/misterninjaboy

Re: Weapon Switching Script

on Fri Jan 23, 2015 5:48 pm
Great share!
avatar
Member [Lv. 0]
Member [Lv. 0]
Posts : 1
Points : 1210
Rep : 0
Join date : 2015-03-30
Age : 19
Location : Kentucky
View user profile

Script update

on Mon Mar 30, 2015 1:47 am
I fixed this script to work with Unity 5 c:

Code:

var gun1 : GameObject;
var gun2 : GameObject;
 
 function Update(){
 if(Input.GetButtonDown("SwitchWeapons"))
   SwapWeapons();
 }
 
 function SwapWeapons(){
 if (gun1.active == true) {
 gun1.SetActive(false);
 gun2.SetActive(true);
 } else {
 gun1.SetActive(true);
 gun2.SetActive(false);
 }
 }
Member [Lv. 2]
Member [Lv. 2]
Posts : 9
Points : 1241
Rep : 4
Join date : 2015-04-08
View user profile

Re: Weapon Switching Script

on Tue Jul 07, 2015 6:40 pm
Personally unity 5 lags me out so i stuck with unity 4.6.2 not really missing out on much

also thanks for the script!


Last edited by Outboundstream4 on Tue Jul 07, 2015 6:41 pm; edited 1 time in total (Reason for editing : forgot to put something in)
avatar
Moderator
Moderator
Posts : 329
Points : 2176
Rep : 43
Join date : 2014-03-12
Age : 18
Location : Italy
View user profilehttp://masterdevelopers.altervista.org/

Re: Weapon Switching Script

on Wed Jul 08, 2015 6:55 am
I already made a switch weapon script,but is useful thanks
Back to top
Permissions in this forum:
You cannot reply to topics in this forum