Halftrack gun

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
User avatar
Alcoholic
General
Posts: 1470
Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:

Halftrack gun

Post by Alcoholic »

does anybody know a good way to make a player in SP use a halftrack mg? i tried attachturretslot 0, but it said it was locked. so i unlocked it and tried it again. i could use the gun, but couldnt really see it, and my screen bobbed up and down, as if you lean left, over and over... does anybody know a good way to do it?
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Hmm I doubt if you can make it much better than that. If the original game developers didn't need such a feature they more than less likely didn't add support for it. :(
Image
User avatar
mohaa_rox
Field Marshal
Posts: 2760
Joined: Mon Nov 11, 2002 7:05 am
Contact:

Post by mohaa_rox »

try to attach the player to the passengerslot1, where the machine gunner's supposed to be.
Live to map, not map to live.
-mohaa_rox, .map
moderator
Desert Eagle
Captain
Posts: 237
Joined: Mon Jan 13, 2003 1:05 am
Location: Mapping Bunker
Contact:

Post by Desert Eagle »

You could try hiding the player while maning the mg.
Desert-Eagle
....The Eagle Has Landed...
User avatar
mohaa_rox
Field Marshal
Posts: 2760
Joined: Mon Nov 11, 2002 7:05 am
Contact:

Post by mohaa_rox »

i don't think u can hide a player :?
Live to map, not map to live.
-mohaa_rox, .map
moderator
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

look at the global/vehicle_thinkers.scr under jeep controler the SDK uses a halftrack and this thread in it's tutorial about rideing a vehicle . Here is part of it .
local.vturretent = self queryturretslotentity 0
local.vturretent unlock
self attachturretslot 0 $player // Attach the player to the jeep
$player perferredweapon ".30cal Machine Gun"
local.vturretent lock
User avatar
Alcoholic
General
Posts: 1470
Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:

Post by Alcoholic »

if i put the player in the passenger slot, he has no gun. is there anyway to give the player an mg42?
Desert Eagle
Captain
Posts: 237
Joined: Mon Jan 13, 2003 1:05 am
Location: Mapping Bunker
Contact:

Post by Desert Eagle »

Sure you can hide players, that is what I did in my TOW map, during the victory movie, frozen em hid em, and made them not solid, as not to interfere with movie animations.


part of my script used:

//-------------------------------------------------------
win_game_allies:
//-------------------------------------------------------
drawhud 0 // clear the screen

//stop the players
$player nodamage
$player hide
$player notsolid
freezeplayer

If you just use $player hide, players can still run around on map. Not sure if it would work in SP though.

Image
Desert-Eagle
....The Eagle Has Landed...
User avatar
Alcoholic
General
Posts: 1470
Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:

Post by Alcoholic »

forget hiding the player, can you give him an mg42?
User avatar
Alcoholic
General
Posts: 1470
Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:

Post by Alcoholic »

If i attach player to teh passenger slot, everything is fine except he has no gun. So im gonna stick wiht teh passenger slot and hope i can give him a gun.
User avatar
Alcoholic
General
Posts: 1470
Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:

Post by Alcoholic »

OK, Ive got an idea for this to work... First of all i need some info...

How do you properly use the doUse function? as in, how do you force the player to use something? think of it as some invisible force automatically pushing the use key on ur keyboard for you. i want the player to forcibly 'use' an object.
nuggets
General
Posts: 1006
Joined: Fri Feb 28, 2003 2:57 am
Location: U-england-K (england in the UK) :P
Contact:

Post by nuggets »

depends on what they're using and disabling the ai
hope this helps, prob not cos it's all foreign 2 me :-/
User avatar
Alcoholic
General
Posts: 1470
Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:

Post by Alcoholic »

i want the player to use an mg42.
User avatar
mohaa_rox
Field Marshal
Posts: 2760
Joined: Mon Nov 11, 2002 7:05 am
Contact:

Post by mohaa_rox »

i think we need to make a new model of the halftrack, with an eyebone or something.

too bad we can't import SH models, or it would be much easier to see. :cry:
Live to map, not map to live.
-mohaa_rox, .map
moderator
Post Reply