Scripting Drivable Tanks: HELP
Moderator: Moderators
-
Goldeneye090
- Colour Sergeant
- Posts: 79
- Joined: Mon May 10, 2004 10:11 pm
Scripting Drivable Tanks: HELP
Hello all...I'm having trouble with one of the site's tutorials...scripting drivable tanks...it's found here: /t.php?id=72
I followed that tutorial very carefully (worked with it practically all day), and am still having trouble...I think it left some very key things out and it was hard to understand when I came to the scripting part...I am 110% sure I did the mapping part right, as the tank and it's mask are connected and the target and targetname paths and key/value paths are correct.
After the mapping part, it tells me in the tutorial the following:
"...Make sure you change the targetnames and file name to match the ones in your map."
The file name being the name of the new .map after I saved it should be like this: obj_territory.map (obj_territory is my map's name)
The targetnames suit my map because there is a connecetion between my tank and it's mask as I said before...
Does that statement mean there is something else I have to change? Is what I have to change IN the script? Here is the script the tutorial gives me and tells me to edit to go with my map:
level waittill prespawn
level waittill spawn
main:
$playertank.collisionent = $playertank.target
level.playertanktarget = $player
$player holster
$player takeall
$player physics_off
$playertank waitthread global/vehicles_thinkers.scr::players_tank
$playertank vehiclespeed 200
end
What would I have to change in that script to make my tank drivable if the mapping part is all correct?
Thanks,
GoldenEye
I followed that tutorial very carefully (worked with it practically all day), and am still having trouble...I think it left some very key things out and it was hard to understand when I came to the scripting part...I am 110% sure I did the mapping part right, as the tank and it's mask are connected and the target and targetname paths and key/value paths are correct.
After the mapping part, it tells me in the tutorial the following:
"...Make sure you change the targetnames and file name to match the ones in your map."
The file name being the name of the new .map after I saved it should be like this: obj_territory.map (obj_territory is my map's name)
The targetnames suit my map because there is a connecetion between my tank and it's mask as I said before...
Does that statement mean there is something else I have to change? Is what I have to change IN the script? Here is the script the tutorial gives me and tells me to edit to go with my map:
level waittill prespawn
level waittill spawn
main:
$playertank.collisionent = $playertank.target
level.playertanktarget = $player
$player holster
$player takeall
$player physics_off
$playertank waitthread global/vehicles_thinkers.scr::players_tank
$playertank vehiclespeed 200
end
What would I have to change in that script to make my tank drivable if the mapping part is all correct?
Thanks,
GoldenEye
-
Green Beret
- Major General
- Posts: 746
- Joined: Mon Apr 19, 2004 12:21 pm
- Contact:
what is the name of your .scr,should be the same as your map name.
second im sure this line should be added after
level waittill prespawn
NOTE:the .scr should be in the same folder as your .bsp
second im sure this line should be added after
level waittill prespawn
Code: Select all
level waittill prespawn
level.script = maps/obj/obj_territory.scr-
Master-Of-Fungus-Foo-D
- Muffin Man
- Posts: 1544
- Joined: Tue Jan 27, 2004 12:33 am
- Location: cali, United States
erm the tutorial here is for SPEARHEAD not for MOHAA. are you using AA or SH? because it WONT WORK with AA. To find out how to make driveable tanks, look in M5L2a and b .scr adn decompile the m5l2's bsp's and look in the maps for the triggernames. I did it once.. or was i dreaming.... well it was late when i did, but i got it to work on a custom Single map.
-
Goldeneye090
- Colour Sergeant
- Posts: 79
- Joined: Mon May 10, 2004 10:11 pm
...
Yah I'm doing this for Spearhead...not sure what you mean...there's only a M5l2a .min file...and that's for Allied Assault...for me anyway.
I put in the Spearhead SDK tutorial map from its tools section with the drivable tank .map and .scr file, compiled it and tried to play it...it kicked me while I was loading it with no error message...I was sent to my desktop.
I need a full guide on this. Anyone started from scratch and gotten a drivable tank? If so I wanna see your script, just for the tank.
I put in the Spearhead SDK tutorial map from its tools section with the drivable tank .map and .scr file, compiled it and tried to play it...it kicked me while I was loading it with no error message...I was sent to my desktop.
I need a full guide on this. Anyone started from scratch and gotten a drivable tank? If so I wanna see your script, just for the tank.
Re: ...
Drivable tanks are possible in Spearhead server side, the problem with the are the collision. Anyone know how to add a collision to them to keep them from being driven half way into structures.Goldeneye090 wrote:Yah I'm doing this for Spearhead...not sure what you mean...there's only a M5l2a .min file...and that's for Allied Assault...for me anyway.
I put in the Spearhead SDK tutorial map from its tools section with the drivable tank .map and .scr file, compiled it and tried to play it...it kicked me while I was loading it with no error message...I was sent to my desktop.
I need a full guide on this. Anyone started from scratch and gotten a drivable tank? If so I wanna see your script, just for the tank.
- Deutsche Dogge
- First Lieutenant
- Posts: 183
- Joined: Wed May 07, 2003 11:50 pm
- Location: Quebec
- Contact:
thats entities,.,u cant do that with a tank.,WarTech wrote:Humm,, I ll have to look and see if I can implement. If so them I will have the perfect server side drivable tank script. ThanksDeutsche Dogge wrote:The g_allclasses.html document specifies a "istouching( Entity entity )" method but how and if you can implement it in your case, i don't know.
for the planes collision or howver u spell it i first used tace arround the plane and if it hits bang but then i used a diff meathod i cant actualy remember now:S
- Deutsche Dogge
- First Lieutenant
- Posts: 183
- Joined: Wed May 07, 2003 11:50 pm
- Location: Quebec
- Contact:


