Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → mouse controlled turret trap?
mouse controlled turret trap?
2005-01-02, 11:15 AM #1
#for multiplayer death match#
I would like to know if it is possible to have a trap (thing) control a turret that acts like a player model where you can aim and maybe even have the turret(thing) move with the mouse and stay stationary. That would also be neat if you could toggle views like a player. And maybe have it so you can press space bar or something to exit the trap. Any help is greatly appreciated
shaka!
2005-01-02, 12:31 PM #2
possible in MotS
SpriteMod (JO 2003) Roger Wilco Skin

Snail racing: (500 posts per line) ---@%
2005-01-02, 12:38 PM #3
I'm sure it's possible.
You could try changing the player model into the turret, hiding the old one, and use a flag to prevent actual moving, but I think you'd run into a problem with jumping. An alternative would be to hide the player model, cahnge the turret appropriately, set camera to turret, and use a pulse to keep it's look the same as that of the player. You could also try an attach method to keep the lvecs the same. Ugg, minor note on this, you'd most likely want to use a fireprojectile to get the lvec of the player, otherwise the turret wouldn't be able to fire up and down.
_ _ _____________ _ _
Wolf Moon
Cast Your Spell On Me
Beware
The Woods At Night
The Wolf Has Come
2005-01-02, 1:56 PM #4
could I make a model that had some properties of a player ? just the aiming and firing? and maybe keep the camera view behind the 3do that would be the turret? Or like you were sayin just have a camera view that could fire with the movement of the mouse with crosshairs. either one would be cool but the first one is something I really want to try.
shaka!
2005-01-02, 2:23 PM #5
This is possible. It would be easier in MotS, but its possible in JK. I'd go with the lookvector matching mentioned above.

As mentioned, you'll have to do the old fire a ghost and get its lookvector method as just using getthinglvec on the player doesn't get the z value.

Are we talking a trap that can look all 360 degrees here, or is it more like a mounted turrent that can only face on direction? If we're talking the later, you'll have to code some stuff to stop the player from looking outside the wanted spectrum. You can probably use vectordot() to assure that its not looking outside that spectrum, and if it is just reset the player to the last 'good' look value.

Is this a level cog or can we do mod stuff here too? Because I can't think of any way to allow the player to control firing without modifying some weapon cogs or creating a new one.
-El Scorcho

"Its dodgeball time!" -Stormy Waters
2005-01-02, 7:18 PM #6
yeah its a level and I am not a cog writer whatsoever trying to read how to, but this is deeper editing I'm guessing. but if its possible I would definately like to try. And yeah it would be fine either way if it rotated 360 or if it could be set so it could only goto a certain point like your saying.
shaka!
2005-01-03, 12:06 PM #7
I might have an idea... I'm too lazy to write a COG so others will have to create from what I'm about to say.

1. To achieve firing simply (OK, the only way I know of so far) would be to take the player, teleport him into a small 2x2x2m big box, and have look-alike take the chair in the control room. Oh, and remove all weapons from the player temporarily so you get the right firing rate without damaging yourself (bryar, rifle, repeater).

2. Catch a damaged message on all 6 sides of this little room and when damaged, have the turret fire.

3. 2 ways that I know of how to make the head of a turret to move to where the player is looking. a) have 2 seperate 3DOs. One the base, the other the head. Head must be round otherwise it would look a little strange. Head having the LookVec of the ghost thingy that shoots every 0.01 seconds. b. I think, to have an actor turret (like in SP) and have it look at a specific spot somewhere... I'm not sure how as I don't know, but you guys could probebly figure something out.

4. Not to forget, when dummy damaged, relay damage to player, and when player killed, send him back to the chair and remove dummy.

/Edward
Edward's Cognative Hazards
2005-01-04, 5:41 PM #8
yeah that would work if I could have it so it changes the model to the turret 3do when it teleports to the new view
shaka!
2005-01-04, 8:49 PM #9
or could I have my 3do of a minigun turret with a ghost parent somehow would you be able to see the 3do somehow?
shaka!

↑ Up to the top!