Author Topic: RC Tank - Help Needed  (Read 1179 times)

OK- I have been trying to mod bushido's rc bomb to be an RC Tank...
The only 2 problems i am having are:
Getting the Tank Shell to fire above the tank...(Currently fires underneath the tank)
Code: [Select]
{

%projectile = TANKSHELLProjectile;
%p = new Projectile()
{
dataBlock = %projectile;
initialVelocity = "0 0 0"; //shell direction and speed
initialPosition = %obj.getPosition(); //shell launch position
sourceObject = %obj.TankerOwner.player;
sourceSlot = %slot;
client = %obj.TankerOwner;
};

AND
putting this(to dismount):
Code: [Select]
if(isObject(%obj.getControllingClient()))
%obj.getControllingClient().setControlObject(%obj.getControllingClient().player);
%obj.schedule(10, delete);
binded to a:
Code: [Select]
function servercmdLight();
PLEASE HELP
« Last Edit: May 03, 2012, 06:23:49 PM by MARBLE MAN »

OH
%obj is the tank
« Last Edit: May 01, 2012, 09:13:10 PM by MARBLE MAN »

Can someone please help??
« Last Edit: May 01, 2012, 09:13:23 PM by MARBLE MAN »

y u no help a helpless helplet

Chill the forget out man. This is one of the slowest boards on the forum, there's no need to bump every hour and a half

even on the next day, it's still on the first page
so, what's the problem?

okay.. can someone just post maybe 3-7 lines of code that can fix this??

okay.. can someone just post maybe 3-7 lines of code that can fix this??
What
is
the
problem



Don't be handicapped
You obviously aren't being clear if two separate people have to ask what the problem is. A block of code is not a problem, explain what is broken with actual goddamn words.

Code: [Select]
{

%projectile = TANKSHELLProjectile;
%p = new Projectile()
{
dataBlock = %projectile;
initialVelocity = "0 0 0"; //shell direction and speed
initialPosition = %obj.getPosition(); //shell launch position
sourceObject = %obj.TankerOwner.player;
sourceSlot = %slot;
client = %obj.TankerOwner;
};
PLEASE HELP

Change the velocity numbers to what you need.

initialPosition = %obj.getPosition(); //shell launch position
sourceObject = %obj.TankerOwner.player;


Um, this looks like you are firing from the player that controls the tank.

Also there could be a line somewhere that when you dismount, the projectile automatically explodes.  You need to get rid of this so you don't fire an automatically exploding shell in your face.

Also you will need to make sure that the shell matches with the size of your tank.  Using the tank shell from a tank half the normal one's size would be ridiculous.

Change the velocity numbers to what you need.
I have done that

initialPosition = %obj.getPosition(); //shell launch position
sourceObject = %obj.TankerOwner.player;


Um, this looks like you are firing from the player that controls the tank.
Nope, but if you add anything or change the position value, it goes to the map 0,0,0

Also there could be a line somewhere that when you dismount, the projectile automatically explodes.  You need to get rid of this so you don't fire an automatically exploding shell in your face.

Also you will need to make sure that the shell matches with the size of your tank.  Using the tank shell from a tank half the normal one's size would be ridiculous.
There is-
it deletes %p from the mission

You didnt answer my question about making the cannon fire from above the tank

I have done that
Nope, but if you add anything or change the position value, it goes to the map 0,0,0
There is-
it deletes %p from the mission

You didnt answer my question about making the cannon fire from above the tank
You didn't ASK that question!

You didn't ASK that question!
Well, the 1st problem is that :P I just forgot to explain..
Let me edit that...

Locking if no one posts in 1 week.......