Scripting Drivable Tanks: HELP

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
Goldeneye090
Colour Sergeant
Posts: 79
Joined: Mon May 10, 2004 10:11 pm

Scripting Drivable Tanks: HELP

Post by Goldeneye090 »

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
Green Beret
Major General
Posts: 746
Joined: Mon Apr 19, 2004 12:21 pm
Contact:

Post by Green Beret »

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

Code: Select all

level waittill prespawn
level.script = maps/obj/obj_territory.scr
NOTE:the .scr should be in the same folder as your .bsp
Image
Master-Of-Fungus-Foo-D
Muffin Man
Posts: 1544
Joined: Tue Jan 27, 2004 12:33 am
Location: cali, United States

Post by Master-Of-Fungus-Foo-D »

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.
Image
The Fungus Theme song!!!

Code: Select all

while (local.player istouching self)
Goldeneye090
Colour Sergeant
Posts: 79
Joined: Mon May 10, 2004 10:11 pm

...

Post by Goldeneye090 »

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.
WarTech
Colour Sergeant
Posts: 88
Joined: Mon May 05, 2003 3:15 am

Re: ...

Post by WarTech »

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.
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.
User avatar
Deutsche Dogge
First Lieutenant
Posts: 183
Joined: Wed May 07, 2003 11:50 pm
Location: Quebec
Contact:

Post by Deutsche Dogge »

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. :cry:
Image
Click sig to visit the alternation modding community
WarTech
Colour Sergeant
Posts: 88
Joined: Mon May 05, 2003 3:15 am

Post by WarTech »

Deutsche 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. :cry:
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. Thanks
Elgan
Lieutenant General
Posts: 890
Joined: Tue Apr 13, 2004 10:43 pm
Location: uk
Contact:

Post by Elgan »

WarTech wrote:
Deutsche 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. :cry:
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. Thanks
thats entities,.,u cant do that with a tank.,

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
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

errrm.. Elgan? you ok mate? tanks are entities, anything but brishes are entities, and some brushes at that.
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
Elgan
Lieutenant General
Posts: 890
Joined: Tue Apr 13, 2004 10:43 pm
Location: uk
Contact:

Post by Elgan »

lizardkid wrote:errrm.. Elgan? you ok mate? tanks are entities, anything but brishes are entities, and some brushes at that.
i mean cant do that with a tank cos it cant do if is tocyhing world etrc
User avatar
Deutsche Dogge
First Lieutenant
Posts: 183
Joined: Wed May 07, 2003 11:50 pm
Location: Quebec
Contact:

Post by Deutsche Dogge »

yeah, EVERYTHING would have to be an entity then, but that's not a good thing. isn't it. :wink:
Image
Click sig to visit the alternation modding community
Post Reply