Quote:
Originally Posted by adam
Yeah, I was just thinking about that actually. It's mostly that I never realized I could do it the way I did until recently. Ya know, it's 'new to me' syndrome, I just wanna do it that way. And it's also just a one line declaration this way.
|
Generally I do something like this (using custom projectiles as an example of something I used it for)
PHP Code:
CustomProjectile = new TStaticVar();
CustomProjectile.join("projectile");
then in other scripts I can just do
PHP Code:
temp.proj = new CustomProjectile();
proj.x = 10;
proj.y = 12;
proj.angle = pi / 2;
proj.speed = 5;
proj.fire();
I guess you could also make a function for them but I prefer variables to long arrays of parameters.
Also sorry if I come off as condescending, I like the way you did it, just wanted to point this out as well in case anyone doesn't know about it

.