are you getting errors while linking your scripts?
Have you done all the necessary steps to make those fx play?
I can't really test anything at the moment because my game won't open
When I use this:
Code Snippet
Plaintext
weapon = getWeapon("tesla_gun");
I'm get errors while linking, but when I use the code that I sent, it links but does not work in the game, and when I use without checking the weapon, the effects appear without any problem.
I re-wrote the script to be much shorter, and more flexible. I'm not trying to step on your toes, or 1-up you or anything like that. Just figured this might help, especially if you are busy and I know you've mentioned updating the script anyways, so maybe this will save you the trouble. If you don't use it that's fine also, no offense taken. I'm not the best scripter, but pretty decent I believe, lol. Here it is.
Code Snippet
Plaintext
//Follow the same steps in the tutorial, //except name all the triggers shootable_trig, //and don't add numbers to them. //Then make each trigger target it's bottle by selecting the trigger first, //then select the bottle, hit W in radiant to link them. //Now you can place as many of these as you want, without having to change anything in script. //Let's get them all as an array //instead of writing a seperate function for each bottle, and with no 'while()' loops eating memory
I re-wrote the script to be much shorter, and more flexible. I'm not trying to step on your toes, or 1-up you or anything like that. Just figured this might help, especially if you are busy and I know you've mentioned updating the script anyways, so maybe this will save you the trouble. If you don't use it that's fine also, no offense taken. I'm not the best scripter, but pretty decent I believe, lol. Here it is.
Code Snippet
Plaintext
//Follow the same steps in the tutorial, //except name all the triggers shootable_trig, //and don't add numbers to them. //Then make each trigger target it's bottle by selecting the trigger first, //then select the bottle, hit W in radiant to link them. //Now you can place as many of these as you want, without having to change anything in script. //Let's get them all as an array //instead of writing a seperate function for each bottle, and with no 'while()' loops eating memory