Hi!
today I have made a new particle modifier script...
this is basically just to show how to use the particle with variables..
if you press Up Arrow (using Keycode.UpArrow) you can increase the particle Size..
and vice versa
the thing is with this script, the Multiplier I may have messed up...to what I may be thinking is:
since 1*5 = 5, and -1*5 = -5, this case you would have the particle increase on a negative scale...which in match terms this seems really weird to have a negative scale for increasing integers..it works I guess...
It may seem extremely hard to get used to, so indeed I will rewrite a full script that people can use if they insist I do..
here is the script: (JavaScript, UnityScript)
Thank you!
today I have made a new particle modifier script...
this is basically just to show how to use the particle with variables..
if you press Up Arrow (using Keycode.UpArrow) you can increase the particle Size..
and vice versa
the thing is with this script, the Multiplier I may have messed up...to what I may be thinking is:
since 1*5 = 5, and -1*5 = -5, this case you would have the particle increase on a negative scale...which in match terms this seems really weird to have a negative scale for increasing integers..it works I guess...
It may seem extremely hard to get used to, so indeed I will rewrite a full script that people can use if they insist I do..
here is the script: (JavaScript, UnityScript)
Code:
var theparticle : Particle;
var multiplier : int;
var decrease : int;
var minimumenergy : int;
var minimumsize : int;
var maximumsize : int;
var maximumenergy : int;
function Start () {
theparticle.startEnergy = minimumenergy; //this will start the the particle system with
//the minimum energy possible...
theparticle.size = minimumsize; //this will start the particle system with the minimum size..
Check();
Checktwo();
}
function Update () {
if(Input.GetKeyDown(KeyCode.DownArrow)) {
theparticle.size = theparticle.size*multiplier;
}
if(Input.GetKeyDown(KeyCode.UpArrow)) {
theparticle.size = theparticle.size/multiplier;
}
}
function Check () {
if(theparticle.size == maximumsize) {
theparticle.size = minimumsize;
}
}
function Checktwo () {
if(theparticle.energy == maximumenergy) {
theparticle.energy = minimumenergy;
}
}
Thank you!