Author Topic: Render targets status  (Read 7867 times)

0 Members and 1 Guest are viewing this topic.

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: Render targets status
me discovering the mouse functions is why hudpong exists. id never have written the script otherwise. i was messing around with my moving retical targeting concept, trying to work out the animated transitions from the static central, non tracking position, to the coordanate tracking mode where its actually leading the target. i never got the lead to work but in the process of making what i had written stable, plugged in the mouse functions into my crosshair render function. resulting in a reticle which moved as a mouse. i thought it would be a good way to controll a turret or something. but instead i wrote a pong game. :D
Tie firing angle and camera angle to it as well, and...Freelancer's Turret View anyone? ;7

i look forward to a rotateTurretX(), rotateTurretY(), and fireTurret() functions. hint hint coders :D
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline Wanderer

  • Wiki Warrior
  • 211
  • Mostly harmless
Re: Render targets status
I'm not sure but it might be posssible to use scripts to force turrets to target only ships targetted by the player... That is simply getting targetname = ship.Target.Class.Name and then forcing turrets to target the target targetted by the ship like ship["turretname"].Target = mn.getShipByName(targetname)

Havent tested that though.. perhaps i should. Needs loads of ifs to prevent nil targetting and such but it might be possible
Do not meddle in the affairs of coders for they are soggy and hard to light

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: Render targets status
i should try that. any way you could target coordanates in 3d space rather than an opject? that way i can tell the turret where to put its guns, which would mean blindfire of sorts. 

you wouldnt by chance know a way to force aspect lock on a certain target? i want to use aspect guided missiles, but i want to use my own scripted targeting solution.

*edit*
i think i found a bug. i dont think GameInit is getting run when the mission restarts. it would probibly be a good idea to run it again in order to reset constants, if they did it on purpose to prevent redefining of functions, id recomend a GameRestart section so that we can reset variables that would cause problems otherwise.

*another edit*
i got my moving reticle concept working. :D its quite awesome if you clear the hud with +override: yes. otherwise all the other gauges there get in the way and it defeats the purpoose of the thing. its alot easyer to hold onto the ship. it takes getting used to but youl be happy you can see what hes doing rather than staring at 2 crosshairs in empty space. il post the code once i clean it up, and finish the transitions and color and alpha shift. i also plan on cramming as much information into the thing as possible.but anyway i got some more code to write :D
« Last Edit: July 14, 2006, 12:13:49 pm by Nuke »
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Re: Render targets status
Code: [Select]
[quote author=Nuke link=topic=37992.msg835926#msg835926 date=1152872876]i should try that. any way you could target coordanates in 3d space rather than an opject? that way i can tell the turret where to put its guns, which would mean blindfire of sorts.
Noop, not atm.

you wouldnt by chance know a way to force aspect lock on a certain target? i want to use aspect guided missiles, but i want to use my own scripted targeting solution.

Again, noop. Most of the targeting code is hacked in, so that it works differently for the AI than it does for the player. I am not happy with this, and haven't tackled that part of the code yet, because I know that I'm not going to like maintaining backwards compatibility while trying to extend it to support the stuff you'd want to do with scripting.

*edit*
i think i found a bug. i dont think GameInit is getting run when the mission restarts. it would probibly be a good idea to run it again in order to reset constants, if they did it on purpose to prevent redefining of functions, id recomend a GameRestart section so that we can reset variables that would cause problems otherwise.

Not a bug, the GameInit hook is run once when the game initializes. :p A mission init hook would be a good idea, I'll make a mental note to add it in whenever I get around to deciding how to handle state initialization. (Probably just add extra hooks)
-C

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: Render targets status
so hows the scripting -> hud table interface? is it possible to define a guage function in scripting, and let the hud table decide weather or not tu use it.
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline Kaine

  • 27
Re: Render targets status
did it occur to anyone else that with mouse control on the HUD we could make a working freelancer-esque control setup for mouse control? a "center ship on mouse position" function could go a long way :) just make sure you leave the static crosshair and lead indicator intact.

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: Render targets status
did it occur to anyone else that with mouse control on the HUD we could make a working freelancer-esque control setup for mouse control?
We already have it.  Someone (can't remember his name off-hand) sent me a patch a while ago.  The problem is that adding new controls breaks pilot files so this has to wait until the new pilot file code before getting in CVS.  But, it's coming eventually.

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Re: Render targets status
so hows the scripting -> hud table interface? is it possible to define a guage function in scripting, and let the hud table decide weather or not tu use it.

No, the two systems are completely separate, for the moment at least.
-C

  

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: Render targets status
id like them at some point to be integrated. probibly assign subsections to the $HUD section, each section can be givin a name which can be called in the hud_guages.tbl. the script in that section then will be run every time you use that particualar hud definition. that way i can do cutom gauges without havig to override the whole hud.
« Last Edit: July 17, 2006, 01:55:00 am by Nuke »
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN