Transport Heli
by J L · in Combat Starter Kit · 12/10/2008 (11:00 am) · 5 replies
If you use either right door or left door gunner it is very easy to hit your own chopper, is there a way to change this in scripts ?
About the author
#2
Looking at the transheli:onAdd() I see these methods being called for each turrent:
I assumed that those settings would be what you were looking for. Hmmm, but what do those settings mean? What kind of text editor are you using? I ask because I then did a Find-in-files for setTurretOptions. F-I-F often answers many question. That function is defined in the source and the variables are explicitly listed there.
12/12/2008 (1:48 pm)
Simple, don't shoot your chopper - LOL!Looking at the transheli:onAdd() I see these methods being called for each turrent:
%turret.setTurretOptions(180,180,2,-175,0,-20,45); // for turret #1 %turret.setTurretOptions(180,180,2,10,175,-20,45); // for turret #2
I assumed that those settings would be what you were looking for. Hmmm, but what do those settings mean? What kind of text editor are you using? I ask because I then did a Find-in-files for setTurretOptions. F-I-F often answers many question. That function is defined in the source and the variables are explicitly listed there.
%turret.setTurretOptions(%maxYawSpeed, %maxPitchSpeed, %activateTime, %minYaw, %maxYaw, %minPitch, %maxPitch)
#4
%turret.setTurretOptions(%maxYawSpeed, %maxPitchSpeed, %activateTime, %minYaw, %maxYaw, %minPitch, %maxPitch)
I searched in the scripts so this must be hard coded then ?
12/12/2008 (7:02 pm)
I understand the how, but I dont understand the where you found that at. the%turret.setTurretOptions(%maxYawSpeed, %maxPitchSpeed, %activateTime, %minYaw, %maxYaw, %minPitch, %maxPitch)
I searched in the scripts so this must be hard coded then ?
#5
The actual Turret::setTurretOptions function is found in turret.cc
12/12/2008 (9:52 pm)
Yeah it's actually a C++ console function. Just because a function is in source doesn't mean that it is hardcoded. You pass the variables into it by calling it with those parameters through script. In this case those settings are applied in the scripted ::onAdd function for the transport heli. The variable names are the same as they are listed in the source. I just threw the % signs in there so you could see how to use it in script. The names correspond with each number parameter/setting in that order.The actual Turret::setTurretOptions function is found in turret.cc
Torque Owner J L
Psycho Hamster Games