|
| 27 Feb 2016 08:19 AM |
So, in my game, you need to be able to find magazines to increase the ammo that you are carrying. I have a stored ammo value in the gun, which controls the amount of ammo that you have before you run out. So the magazine needs to be able to change that value. I think the easiest way would be to make the mag a tool that, when used, changes the value and destroys itself. Does anyone have any ideas on how to do this?
Sorry for the long post :/ |
|
|
| Report Abuse |
|
|
|
| 27 Feb 2016 08:23 AM |
| You could also make that tool like a clickdetector or something and when it's clicked the value changes...? |
|
|
| Report Abuse |
|
|
|
| 27 Feb 2016 12:26 PM |
That might work. But does anyone know the script to change the value like that?
nice head btw. XD |
|
|
| Report Abuse |
|
|
|
| 28 Feb 2016 03:43 AM |
| Pretty much everyone on this forum does, but we don't like to give away stuff for free if we didn't see what the person can do himself. If it's satisfying, we'll help out. |
|
|
| Report Abuse |
|
|
|
| 28 Feb 2016 03:51 AM |
x = (x + 1)
So numberValue.Value = (numberValue.Value + 1) |
|
|
| Report Abuse |
|
|
|
| 28 Feb 2016 08:05 AM |
So I put that script inside the magazine and not the gun?
|
|
|
| Report Abuse |
|
|
| |
|
| |
|