Codesampler.com Tutorial
by Phil Nestoryak · in Torque Game Engine · 10/31/2004 (4:51 am) · 9 replies
Just did all the tutorials , very nice, helped me a lot with getting started.
They all worked great except for one, the weapons, puts a rocket launcher in your hand at game start and you can blast away.
It gives an error in the log saying that part of the code added is in error
Player.cs file error at ##
function MyPlayer::onAdd( %this, %obj )
{
They all worked great except for one, the weapons, puts a rocket launcher in your hand at game start and you can blast away.
It gives an error in the log saying that part of the code added is in error
Player.cs file error at ##
function MyPlayer::onAdd( %this, %obj )
{
#2
The code you posted does not contain any errors.
I think the only reason that could happen is if you've forgot a bracket anywhere before or after the function.
10/31/2004 (5:09 am)
Phil,The code you posted does not contain any errors.
I think the only reason that could happen is if you've forgot a bracket anywhere before or after the function.
#3
This is the only tutorial I found to put a weapon in your hand , fire and do damage. (and radius damage) Can you point me to others?
Ive only had this a few days, and Im 1/2 way thru Kens book, this is very nice!
10/31/2004 (5:25 am)
I did a copy-n-paste from his tutorial to the very end of the player.cs script, all of them worked except the rocket stuff. I also did a recompile, still nothing.This is the only tutorial I found to put a weapon in your hand , fire and do damage. (and radius damage) Can you point me to others?
Ive only had this a few days, and Im 1/2 way thru Kens book, this is very nice!
#4
I could be way off here, haven't tried working with the tutorial you are dealing with but that error could be something a bit more mundane. Could you post (or look at if prefer) the function before this one, I have seen similar issues when missing a trailing semi-colon on a line before this one or perhaps a brace missing (although I doubt that one). Anyhow, not sure it will help but as Stefan said I can't seen anything glaringly wrong with that although I can't recall an instance of parent used from script I wouldn't stake any words on my limited exposure there. =)
Anyhow, hope things work out for you on this... Good luck
Mark
10/31/2004 (6:32 am)
Phil,I could be way off here, haven't tried working with the tutorial you are dealing with but that error could be something a bit more mundane. Could you post (or look at if prefer) the function before this one, I have seen similar issues when missing a trailing semi-colon on a line before this one or perhaps a brace missing (although I doubt that one). Anyhow, not sure it will help but as Stefan said I can't seen anything glaringly wrong with that although I can't recall an instance of parent used from script I wouldn't stake any words on my limited exposure there. =)
Anyhow, hope things work out for you on this... Good luck
Mark
#5
function Player::playCelAnimation( %this, %anim )
{
%this.setActionThread( "cel" @ %anim );
}
function MyPlayer::onAdd( %this, %obj )
{
10/31/2004 (6:44 am)
Here is the prior function along with the added one:function Player::playCelAnimation( %this, %anim )
{
%this.setActionThread( "cel" @ %anim );
}
function MyPlayer::onAdd( %this, %obj )
{
#6
10/31/2004 (6:50 am)
I tried the functions you posted and none of them give me an error on either my build, or 1.3.
#7
function Player::playCelAnimation( %this, %anim )
{
%this.setActionThread( "cel" @ %anim );
}
function MyPlayer::onAdd( %this, %obj )
{
10/31/2004 (6:54 am)
Here is the prior function along with the added one:function Player::playCelAnimation( %this, %anim )
{
%this.setActionThread( "cel" @ %anim );
}
function MyPlayer::onAdd( %this, %obj )
{
#8
11/06/2004 (4:07 pm)
Hey Phil, I have the same white water problem at the moment. Where and how did u fix it? (version 1.3). Thanks.
#9
Im messing with Tims Combo Pack now....wild... took a bit to get the environments to work (2 are still a bit hosed) but very nice. Putting together the Castle takes time but worth it. Its huge.
11/06/2004 (5:00 pm)
F3 World Inspector then cilck on the water, right pane bottom should say water, select expand all , scroll down to Debugging, UNCHECK UseDepthMask, scroll down to Surface select envMapIntensity , change to 0 then hit the APPLY button.Im messing with Tims Combo Pack now....wild... took a bit to get the environments to work (2 are still a bit hosed) but very nice. Putting together the Castle takes time but worth it. Its huge.
Torque Owner nibbuls
Sorry, but I can't help you there.