Author Topic: turret positions  (Read 2739 times)

0 Members and 1 Guest are viewing this topic.

Offline redmenace

  • 211
what part of the code would handle the default(the position that the turrets are in the not engaging an enemy) position of turrets?
Government is the great fiction through which everybody endeavors to live at the expense of everybody else.
              -Frederic Bastiat

 

Offline EdrickV

  • Valued
  • 29
    • http://members.aol.com/HunterComputers
None. The starting positions are set on the model. When a turret stops attacking someone for whatever reason, it stops moving till something else comes into it's field of view that it can fire at.
Ground - "Let me help you out, you're clear to taxi any way you can, to any runway you see."

Mesh Gallery/Downloads:
http://members.aol.com/ArisKalzar/Gallery.html
Turreting 101:
http://members.aol.com/EdrickV/FS2/Turreting.html

http://members.aol.com/HunterComputers

 

Offline redmenace

  • 211
Well would it be possible to setup the turrets to be a certain way just before it jumps out. This is a question relating more towards the TBP than just Freespace in general.
Government is the great fiction through which everybody endeavors to live at the expense of everybody else.
              -Frederic Bastiat

 

Offline IceFire

  • GTVI Section 3
  • 212
    • http://www.3dap.com/hlp/hosted/ce
It'd be cool if we could set the default positions in the model and not be restricted to straight up and down of the turret barrels.

And it would be cool perhaps to either have a sexp or have a auto function so that all turrets reset their positions if no enemies are within a radius of 8 kilometers for say 60 seconds.

EDIT: The radius thing might cause some trouble....perhaps another method?
- IceFire
BlackWater Ops, Cold Element
"Burn the land, boil the sea, you can't take the sky from me..."

 

Offline StratComm

  • The POFressor
  • 212
  • Cameron Crazy
    • http://www.geocities.com/cek_83/index.html
Perhaps if the turret has nothing to track when its weapon is ready to fire again, it moves back to its default position.  Don't know how this would be implimented, but presumably you could use the same code as for normal tracking but track to a default normal, either global or pof-specified.
who needs a signature? ;)
It's not much of an excuse for a website, but my stuff can be found here

"Holding the last thread on a page comes with an inherent danger, especially when you are edit-happy with your posts.  For you can easily continue editing in points without ever noticing that someone else could have refuted them." ~Me, on my posting behavior

Last edited by StratComm on 08-23-2027 at 08:34 PM

 

Offline IceFire

  • GTVI Section 3
  • 212
    • http://www.3dap.com/hlp/hosted/ce
Yeah, I just think it looks silly when the Nova's big giant turrets are pointing straight up all the time when going into battle...so if we can make that look better it'd be great.
- IceFire
BlackWater Ops, Cold Element
"Burn the land, boil the sea, you can't take the sky from me..."

 

Offline redmenace

  • 211
So does anyone know how we could implement this into the source code. Also, Icefire why do the turrets need to be pointing straight up on TBP models?
Government is the great fiction through which everybody endeavors to live at the expense of everybody else.
              -Frederic Bastiat

  

Offline Fury

  • The Curmudgeon
  • 213
Quote
Originally posted by redmenace
Icefire why do the turrets need to be pointing straight up on TBP models?

It is not just TBP models. All FS2 ships have the same problem.
At the moment I can't remember why though.

Look at the Hecate, it's turrets are not as big as Nova's, but they are also pointing straight up at first.

 

Offline Nico

  • Venom
    Parlez-vous Model Magician?
  • 212
Quote
Originally posted by Mr. Fury

It is not just TBP models. All FS2 ships have the same problem.
At the moment I can't remember why though.


if they're not, they rotate weird when tracking a ship: aiming anywhere save at the target.
SCREW CANON!

 

Offline Raptor

  • 210
Quote
Originally posted by venom2506


if they're not, they rotate weird when tracking a ship: aiming anywhere save at the target.


Aeolus is the best example, really bad.

Someone should re-make the Aeolus.  Same overal shape, but fix those turrets, and the textures.  They are quite poorly done.
...There ought to be something surreal about a Zoid offering romantic advice...and yet there is not. It seems perfectly normal that the Liger is giving Bit advice on relationships, and it shouldn't, but it does. Dangit man, you've confused me again.[/I]
NGTM-R review of one of the chapters in my fanfic story :D Story is here! -> 'Ancient Legacies'

 

Offline EdrickV

  • Valued
  • 29
    • http://members.aol.com/HunterComputers
Quote
Originally posted by Mr. Fury

It is not just TBP models. All FS2 ships have the same problem.
At the moment I can't remember why though.

Look at the Hecate, it's turrets are not as big as Nova's, but they are also pointing straight up at first.


The program assumes turrets will either be pointing straight up or straight down, so it can tell how to rotate the barrel to face an enemy ship. If the barrel was pointing forward, it would point the top side of the barrel at the ships it's firing at. Changing this behavior could be problematic, but making a SEXP to point a turret in a direction relative to it's center might be possible. (Though someone would have to figure out how the turret figures out where to point now. Was too convulted for me to get last time I looked at it.) Pointing a turret at an enemy ship isn't quite as simple as it sounds on the surface. :)
Ground - "Let me help you out, you're clear to taxi any way you can, to any runway you see."

Mesh Gallery/Downloads:
http://members.aol.com/ArisKalzar/Gallery.html
Turreting 101:
http://members.aol.com/EdrickV/FS2/Turreting.html

http://members.aol.com/HunterComputers

 

Offline redmenace

  • 211
I hate to necromance this thread but, I am planning on taking up the challenge of implementing the way a turret points based upon a value from the ship.tbl file or possibly from the pof. Does anyone have an understanding of how the turrets currently target objects, and work in general, which .cpp and .h files in general handle this. also how can I get a current version the source code?
Government is the great fiction through which everybody endeavors to live at the expense of everybody else.
              -Frederic Bastiat

 

Offline EdrickV

  • Valued
  • 29
    • http://members.aol.com/HunterComputers
Quote
Originally posted by redmenace
how can I get a current version the source code?


Use WinCVS. Should be a thread or two about how to setup and use it here.
As for the rest, IIRC I couldn't make heads or tails of the turret targeting code (what I could find) so can't help you there. I'm sure, given the way the game in general is made, that parts of it will be split between multiple files. I would think the code would be in the ship and AI related files. Can't say what ones or what functions to look for. It seemed pretty complex from what I remember.
Ground - "Let me help you out, you're clear to taxi any way you can, to any runway you see."

Mesh Gallery/Downloads:
http://members.aol.com/ArisKalzar/Gallery.html
Turreting 101:
http://members.aol.com/EdrickV/FS2/Turreting.html

http://members.aol.com/HunterComputers