View Single Post
  #2  
Old 05-07-2011, 05:07 AM
Devil_Lord2 Devil_Lord2 is offline
David K?
Devil_Lord2's Avatar
Join Date: Apr 2011
Location: PA, MD.
Posts: 643
Devil_Lord2 can only hope to improve
Quote:
Originally Posted by WhiteDragon View Post
Let's start with some hypothetical weapon script:
PHP Code:
function test(temp.x) {
  return 
temp.x+2;
}

function 
onWeaponFired() {
  
temp.this.test(10);
  echo(
temp.x);

I get up to here so far, excluding why this. is in front of a function... probably because I've never seen it before.. I would understand it without this. in front. Can it use that?

I thought

whatever = 6
return whatever

just returns 6 in whatever to the function that called it.. if it were a number, array, string, variable, or float, it would be inside whatever.. in this case 6..

-WILL EDIT-
Still trying to figure out the geometry/radians type post.. I haven't seen or used it at all.. If I read it a few times I might understand it :x


Okay, at first I wasn't reading "Degree to Radius" but I get it now..
I've taken Trig, Geometry, and Algebra 2 ... Can't say I remember any of it, and stating something math-wise confused the hell out of me and I was missing the point of the function lol

Yeah I get it now.. I love math, but it isn't my strong suit..
I got out of Computer Science because of my C Programming class..
My friend would find the scripts on the internet, and I'd change them towards what we needed... the final we had a third person trying to help and I missed a few classes and didn't understand it at all.. I passed but it wasn't enough for me to feel like I knew what I was doing really >.>

I'm more into art, but I'd still like to be able to know this.. seems easier to learn with the community here.

But yes I get you both.. I've always seen return ??? but never how it was used lol..
Thank you both!
__________________

Digital Media Artist - David K? </3 (UnLoved)
www.davidkrout.com
www.twitch.com/DavidKkz



Reply With Quote