Page 1 of 1

Scripting Drivable Tanks: HELP

Posted: Sat Nov 27, 2004 10:01 pm
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

Posted: Sun Nov 28, 2004 12:26 am
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

Posted: Sun Nov 28, 2004 2:01 am
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.

...

Posted: Sun Nov 28, 2004 2:40 am
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.

Re: ...

Posted: Thu Dec 16, 2004 6:34 pm
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.

Posted: Thu Dec 16, 2004 6:45 pm
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:

Posted: Thu Dec 16, 2004 6:53 pm
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

Posted: Thu Dec 16, 2004 11:39 pm
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

Posted: Fri Dec 17, 2004 12:12 am
by lizardkid
errrm.. Elgan? you ok mate? tanks are entities, anything but brishes are entities, and some brushes at that.

Posted: Fri Dec 17, 2004 1:19 am
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

Posted: Fri Dec 17, 2004 2:07 am
by Deutsche Dogge
yeah, EVERYTHING would have to be an entity then, but that's not a good thing. isn't it. :wink: