Game Development Community

level of argument

by rennie moffat · in Torque Game Builder · 11/16/2009 (12:38 pm) · 6 replies

Hi, I am currently trying to figure out one thing in Torque, I have posted about it but have never received a solid answer. I Hope this will get one. One thing I am trying to understand is the "level" (my term) of certain arguments used. An example would be in a behavior, where bool, int and float, could be considered (in my mind) the same level of argument. But what I am trying to figure out is this.


%direction = %this.owner.rotation


does this "rotation" have arguments which are "on the same level" as it self? in other words, I am thinking thing like velocity, force, size, etc which can be used. Obviously not all for direction but that be used in place of specific method variables.




About the author

My thanks to Garage Games and the Garage Games Community combined with owned determination I got one game up, Temple Racer and I am looking to build more interesting, fun games for the mass market of the iOS app store.


#1
11/16/2009 (1:33 pm)
Quote:One thing I am trying to understand is the "level" (my term) of certain arguments used

Your biggest problem is in using your own terms to describe things instead of thinking in and using the terms of programming and scripting. It will always confuse you if you try to change the terms to your own.

Quote:does this "rotation" have arguments which are "on the same level" as it self?

Have you tried doing a dump of %this.owner? It's been said to you before that you can find out much by calling the .dump() function on an object. You can also figure out what %this.owner is and look up that class in the documentation or do a search for the classname on the forums.
#2
11/16/2009 (2:10 pm)
Jeez.
Ok, this makes my question seem like a bad thing. Like Im lazy. ANyways, I am not. I do appreciate your feedback tho. I do not recall the dump() function will look up. My question really tho, and it relates to this is, can you simply use, getThing, startThing, setThing...

Where, Torque simply recognizes the prefix then relates it to the call Thing?
#3
11/16/2009 (3:36 pm)
Re-read the first sentence of Nick Rafaslki's helpful reply to your previous attempt at this question.
#4
11/16/2009 (5:48 pm)
Quote:
There is no way for the compiler to recognize patterns in your code and generate short cuts for you. Any method with setFoo or getFoo will have to be defined by the programmer (you).

nice.



:]..|k
#5
11/17/2009 (7:20 am)
Also, bear in mind that all torque script variables are just strings. It doesnt matter if you write 5 or "5", it will still be interprated as a number. Thats why they implemented separate string concatenation relation using @

Maybe the only exeption to this is true/false that are interprated like 1/0 (also as strings) you will notice maybe that quotes are not nessesery in some places in order for script to work.

You probably didn't wanted this answer, but it may help you understand Torque script better.
#6
11/17/2009 (11:22 am)
No that's great Milan,
Thank you.

Yah, certainly some work to do. It is just basic concepts I am trying to grasp. Patterns, if you will, figuring out how the circle goes thru the circle hole, and not the triangle one. Once that is sorted I can begin to fly, a little bit.