Camera mocement code
by arteria3d · in Torque Game Engine · 12/22/2004 (7:17 am) · 67 replies
Which script actually contains the movement code for the camera - i.e. when keys are pressed it moves the camera. I want to know this as i wish to have a go at implementing some swim code, and i will need to use this camera move code to be able to do this. I have looked in camera.cs but i cannot see commands such as 'if w key pressed. then move camera..... etc.
Also how would i disable the editor functions in my finished game?? i.e. All the F functions?
Okay i may want the game to have an editor, but i want to know how i disable stuff like this
Cheers
Steve
Also how would i disable the editor functions in my finished game?? i.e. All the F functions?
Okay i may want the game to have an editor, but i want to know how i disable stuff like this
Cheers
Steve
About the author
Owner of uk based Ltd company ArteriaMediaLtd. with a trading name of Arteria3d Website;arteria3d.com
#62
Let me change my previous statement to "That's all the help you will EVER get from me."
Good luck getting your help in the future, I have a feeling you are going to end up with a LOT of unanswered questions.
12/28/2004 (7:07 am)
I think the only thing you proved is what a real moron you are. I'm only rude to ignorant jerks like you who don't know how to keep their mouths shut. Let me change my previous statement to "That's all the help you will EVER get from me."
Good luck getting your help in the future, I have a feeling you are going to end up with a LOT of unanswered questions.
#63
I dont suffer fools my friend, i just laugh....
12/28/2004 (7:10 am)
You mean keep my mouth shut to an insulting, moronic, 'i know it all' jerk like you...... neverI dont suffer fools my friend, i just laugh....
#64
No matter, what you reply now... i am not taking part in this crazy war you are breeding... I cant understand what makes u tick....
12/28/2004 (7:11 am)
Note... you are the only one here.... speaking to me like this.. Check out Charlies, Mathews and Stephen's posts - why are they communicating in a civilised manner, but you are so angry with a big chip on your shoulder.....No matter, what you reply now... i am not taking part in this crazy war you are breeding... I cant understand what makes u tick....
#65
Stevie I respect your effort and understand that its hard being a newb, hell I am still one lol... everyone starts out as one, just the way you learn things... though your tone was a bit off, If you re-read the way you stated certain things I think you can understand why some of us felt the need to get a little defensive...
and with this
like Gonzo said, he spends about 16 hours a day
for 5 weeks while in a course I used Torque to make a simple game... spent 6 hours in class, about 4 hours through work in the morning, and at least another 6-8 at home... thats 16-18... easily more... I got about 3 hours of sleep most nights, spent almost the rest of the day on Torque... We all spend a lot of time, but hopefully we can all help eachother
12/28/2004 (7:18 am)
Gonzo knows his code... thx for the link Gonzo, always find your explanations very very usefull...Stevie I respect your effort and understand that its hard being a newb, hell I am still one lol... everyone starts out as one, just the way you learn things... though your tone was a bit off, If you re-read the way you stated certain things I think you can understand why some of us felt the need to get a little defensive...
Quote:But it is its weakness.....[/quote
[quote]It seems ludicrous that there are tons of commands that are not listed anywhere
Quote:Isnt there a way of getting the players current positionnote you said "Isn't there a way"... not asking "Is there a way"... its all in how you ask it... if you want answers best to ask nicely :)
and with this
Quote:Believe me, i reckon over the past month there is nobody who has spent the ammount of tiime and effort i have put into torque. We are talking of at least 10hrs a dayyou have to admit re-reading this you come off as an ass in this comment, Not saying I think your an ass, after we all calmed down you seem fairly reasonable... though to think you spend more than everyone else is pretty stuck up...
like Gonzo said, he spends about 16 hours a day
for 5 weeks while in a course I used Torque to make a simple game... spent 6 hours in class, about 4 hours through work in the morning, and at least another 6-8 at home... thats 16-18... easily more... I got about 3 hours of sleep most nights, spent almost the rest of the day on Torque... We all spend a lot of time, but hopefully we can all help eachother
#66
When i write a a script that will determine whether the player meets particular conditions, does that script just need to be executed once as part of the game.cs, or do i need to make a call back to itself using schedule?
Steve
12/28/2004 (8:17 am)
A question on the actual topic in hand...When i write a a script that will determine whether the player meets particular conditions, does that script just need to be executed once as part of the game.cs, or do i need to make a call back to itself using schedule?
Steve
#67
Con::executef(mDataBlock,4,"onEnterLiquid",scriptThis(), Con::getFloatArg mWaterCoverage), Con::getIntArg(mLiquidType));
from the updateMove() in player.cc, while some are called every tick, in cases like "onAttack()", where you want to have a script called every time a player is attacking.
This is one of the cases where an understanding of the underlying engine can be so critical--control passes back and forth from the engine methods to script functions very "sneaky-like", and it can be very difficult to have a true grasp of what's going on until you take a good hard look at how the engine-console handoffs work.
In general, whenever you see a Con::executef(...) statement, it means that the engine is handing off an event for script processing. It gets a bit tricky, but again in general, if there is a variable in the first part of the parameters (in this case, mDataBlock), then the script to be called (which is indicated in the quotes) is the one specific to that variable. Again, in this particular case, what really gets called is the player's datablock's onEnterLiquid script function, or Armor::onEnterLiquid() in stock TGE.
12/28/2004 (8:39 am)
It depends on the function itself. Many scripts are "called" as part of the game processing loops, either single time when an event occurs, such as "onEnterLiquid" which as we've seen in the code above is called by the line:Con::executef(mDataBlock,4,"onEnterLiquid",scriptThis(), Con::getFloatArg mWaterCoverage), Con::getIntArg(mLiquidType));
from the updateMove() in player.cc, while some are called every tick, in cases like "onAttack()", where you want to have a script called every time a player is attacking.
This is one of the cases where an understanding of the underlying engine can be so critical--control passes back and forth from the engine methods to script functions very "sneaky-like", and it can be very difficult to have a true grasp of what's going on until you take a good hard look at how the engine-console handoffs work.
In general, whenever you see a Con::executef(...) statement, it means that the engine is handing off an event for script processing. It gets a bit tricky, but again in general, if there is a variable in the first part of the parameters (in this case, mDataBlock), then the script to be called (which is indicated in the quotes) is the one specific to that variable. Again, in this particular case, what really gets called is the player's datablock's onEnterLiquid script function, or Armor::onEnterLiquid() in stock TGE.
Torque 3D Owner arteria3d
Its not good you know; or clever to think, you have an upper hand with newbies.
You see Gonzo i can give as good as i get, to coin the saying - and u dont like me, cos i answer back. I thought u actually said too,, that u were not going to post to me anymore... Please do what you say....