mounted guns on a moving object

UltraProAnti

Newbie
Joined
Nov 22, 2004
Messages
509
Reaction score
0
i have two mounted guns parented to a cablecar tracktrain which runs along, reaches a certain point, then is phys_converted into a physbox and drops. the guns don't work while the cablecar is a tracktrain, but work after it becomes a physbox

anyone had any experience of attached guns to moving objects?

for that matter, anyone had experience of phys_convert? my all-metal cablecar seems to have phys_converted into a balsa cablecar, and floats on the water instead of sinking :hmph:
 
You'll probably have to make the cablecar heavier somehow.
 
actually, even that doesn't work. i tried attaching a physbox with material type = stone.large and mass scale = 10 and it still floated. in fact, it even bounced when it hit the water, like a beach ball. i'm just going to change my func_brush to a parented func_physbox and put up with the few extra CPU cycles needed to deal with a constrained phys entity. at least that way it'll do what i want, and be heavy enough
 
ok, using a parented physbox is definitely NOT the way to go. the physbox goes all haywire and zips around the map randomly instead of following the tracktrain, so i'm back to try to make the phys_convert work

anyone know what this phys_convert parameter means:

Code:
    * swapmodel <target_destination> 

    Model Swap Entity

could this refer to the prop data that you want used for the physbox? if so, that would be awesome. if so, what's the format for the <target_destination>?
 
@ Raeven0

"Model Swap Entity" [swapmodel(string)] - If specified, then the target will take on the model of the specified entity instead of using its own model; that is, if the target is a blue block and you specify the targetname of a green block, then the blue block will turn into a green block when it is converted.

http://www.editlife.net/entity.php?name=phys_convert

suppose the conversion is from func_brush to func_physbox. can i have a physbox specified as the model to be used? and if so, will the swapmodel physbox spawned in aligned the same as the converted brush model and in the exact same location?

finally: is there ANY way to modify the physics properties of a converted func_brush?
 
OK THIS IS HOW IT'S DONE (for future reference)

if you want a train/cable car/whatever brush entity to run along a track for a while then fall (or whatever) at a certain point, DON'T USE PHYS_CONVERT. it's bollocks. instead, make the bit you don't want to fall a tracktrain (or if the whole thing needs to fall, make it an invisible tracktrain). then make the bit you DO want to fall a func_physbox. then attached the two together with a phys_constraint, which can be set to break whenever you want. while this does put a slightly heavier load on your CPU (being phys-based), it does work

NB: being inside a falling physbox = not good. the source engine's relative motion is a bit sketchy in places, and this is one of those places
 
UltraProAnti said:
NB: being inside a falling physbox = not good. the source engine's relative motion is a bit sketchy in places, and this is one of those places
That's one of those times where you cleverly give the player a damage filter that cannot be passed, either by the physbox or by everything, so that he never takes physics damage from it ;)

I don't remember now whether fall damage can be disabled by a damage filter, but I'd say it probably can't...
 
Raeven0 said:
That's one of those times where you cleverly give the player a damage filter that cannot be passed, either by the physbox or by everything, so that he never takes physics damage from it ;)

I don't remember now whether fall damage can be disabled by a damage filter, but I'd say it probably can't...

nice idea. there is one other physics-related problem though with being inside a falling physbox: because of the sketchy relative motion, when the physbox falls, it hits you on the head, then you fall to the floor of it, then it falls some more and hits you on the head again, and so on and so on. as a result your fall is kind of jerky and unconvincing. it's kinda the same physics glitch that makes prop surfing possible (with those wooden pallets etc.). shame really, but instead i'm forcing the player to jump for it before the physbox falls, with a nearby helicopter in full attack mode as an incentive

btw i notice there's no tutorials anywhere that i know of for adding a helicopter to a map. i had to crack open d1_canals_13 to see how valve did it, and surprisingly i actually made it do exactly what i wanted first time. maybe i should write a tute. maybe hl2.net should have a tute forum :thumbs:
 
Back
Top