View Single Post
  #8  
Old 08-18-2010, 10:25 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by adam View Post
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.10;
proj.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 .
__________________
Reply With Quote