Author Topic: Interesting Idea  (Read 1413 times)

0 Members and 1 Guest are viewing this topic.

Offline Singh

  • Hasn't Accomplished Anything Special Or Notable
  • 211
  • Degrees of guilt.
Kill me if this is a stupid idea, but is it possible to combine the code from the "Set-ship-facing" SexP with the AI code?

What I'm talking about is perhaps something using similar (or maybe even the same) code as the abovementioned to implement a new SexP for the AI, where by the ship would move naturally and come to face a certain point (wheter by moving forwards and turning or standing in one place and turning) or ship, as opposed to simply chasing it around.

Is this possible at all?

Or am I going to be shot for this.:nervous:
"Blessed be the FREDder that knows his sexps."
"Cursed be the FREDder that trusts FRED2_Open."
Dreamed of much, accomplished little. :(

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
You're not the first to ask Singh.

Apparently this would require quite a lot of tampering with the AI code.  I doubt anyone is going to try it.

*hopes that having thrown down the gauntlet one the coders will try to prove me wrong* :)
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline Lightspeed

  • Light Years Ahead
  • 212
You could simulate it pretty easily by giving the AI a fake command to attack the target (AI will turn towards it sooner or later) and checking every xx milliseconds if the ship faces the target. Once it does, cancel the attack command and stop the ship.

Something like that should be possible - but dunno how much effort it'd be to code it in.
Modern man is the missing link between ape and human being.

 
LS, one problem with that, its a good idea and all, but...would it still work if the ship is supposed to turn towards a ship while firing at a different one at the same time......?

OT/debunking my own credibility: i don't know squat about SEXP's, so maybe I'm wrong. I do know they're often hard to combine, and i find SEXP construction very hard to understand. I wish someday FRED2_Open can be modified to have SEXPs look more like a nice big expanding/contracting flow chart than a hierarchical list...I work better with images than text, its how my mind thinks (I'm right brain dominant, hehe) ;)
« Last Edit: May 24, 2004, 06:47:11 pm by 1644 »

 

Offline Lightspeed

  • Light Years Ahead
  • 212
right brain = nonsense.

Almost every brain is a 'custom design' :)

And how should it be firing at something else? If it turns towards the point you set it will have to cancel any other actions anyway.
Modern man is the missing link between ape and human being.

 
like i said, i dunno squat. i just thought that making it attack to turn it might screw up things if its supposed to fire at something else the whole time whilst it turns :)

  

Offline Black Wolf

  • Twisted Infinities
  • 212
  • Hey! You! Get off-a my cloud!
    • Visit the TI homepage!
I just wish there was a "Weapons in front" flag or something that would make a ship attack from the front. All the Shivan ships should have this ideally, and a lot of others too. It seems crazy - every FS ship circles around their opponents trying to broadside, even when 90% of their heavy weaponry is up the front.
TWISTED INFINITIES · SECTORGAME· FRONTLINES
Rarely Updated P3D.
Burn the heretic who killed F2S! Burn him, burn him!!- GalEmp