Author Topic: Making AI ship going backward forever  (Read 1986 times)

0 Members and 1 Guest are viewing this topic.

Offline MetalDestroyer

  • Starwars reborn!
  • 210
Making AI ship going backward forever
Hi all,

I'm wondering if it is possible to make an AI ship going backward indefinitely ?
I found out in the ships.tbl, the '$Rear speed' option with his value. But I found nothing in SEXP which let me use this.

There is the "set-object-speed-z" command, but whatever negative value I give, the ship doesn't go backward.

Here the SEXP:
Quote
$Formula: ( every-time
   ( true )
   ( set-object-speed-z
      "My Ship"
      -50
   )
)

 

Offline Colonol Dekker

  • HLP is my mistress
  • 213
  • Aken Tigh Dekker- you've probably heard me
    • My old squad sub-domain
Re: Making AI ship going backward forever
Every time what is true?
Campaigns I've added my distinctiveness to-
- Blue Planet: Battle Captains
-Battle of Neptune
-Between the Ashes 2
-Blue planet: Age of Aquarius
-FOTG?
-Inferno R1
-Ribos: The aftermath / -Retreat from Deneb
-Sol: A History
-TBP EACW teaser
-Earth Brakiri war
-TBP Fortune Hunters (I think?)
-TBP Relic
-Trancsend (Possibly?)
-Uncharted Territory
-Vassagos Dirge
-War Machine
(Others lost to the mists of time and no discernible audit trail)

Your friendly Orestes tactical controller.

Secret bomb God.
That one time I got permabanned and got to read who was being bitxhy about me :p....
GO GO DEKKER RANGERSSSS!!!!!!!!!!!!!!!!!
President of the Scooby Doo Model Appreciation Society
The only good Zod is a dead Zod
NEWGROUNDS COMEDY GOLD, UPDATED DAILY
http://badges.steamprofile.com/profile/default/steam/76561198011784807.png

 

Offline Galemp

  • Actual father of Samus
  • 212
  • Ask me about GORT!
    • Steam
    • User page on the FreeSpace Wiki
Re: Making AI ship going backward forever
You don't want 'every-time' you just want 'when'.
"Anyone can do any amount of work, provided it isn't the work he's supposed to be doing at that moment." -- Robert Benchley

Members I've personally met: RedStreblo, Goober5000, Sandwich, Splinter, Su-tehp, Hippo, CP5670, Terran Emperor, Karajorma, Dekker, McCall, Admiral Wolf, mxlm, RedSniper, Stealth, Black Wolf...

 

Offline MetalDestroyer

  • Starwars reborn!
  • 210
Re: Making AI ship going backward forever
I tryed with the When condition and nothing happened. :/

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Making AI ship going backward forever
Is a negative speed considered backwards or is it a combination of a positive speed and a negative thrust modifier that you really need?
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline Colonol Dekker

  • HLP is my mistress
  • 213
  • Aken Tigh Dekker- you've probably heard me
    • My old squad sub-domain
Re: Making AI ship going backward forever
You can't just use a when, try using a has time elapsed.
Campaigns I've added my distinctiveness to-
- Blue Planet: Battle Captains
-Battle of Neptune
-Between the Ashes 2
-Blue planet: Age of Aquarius
-FOTG?
-Inferno R1
-Ribos: The aftermath / -Retreat from Deneb
-Sol: A History
-TBP EACW teaser
-Earth Brakiri war
-TBP Fortune Hunters (I think?)
-TBP Relic
-Trancsend (Possibly?)
-Uncharted Territory
-Vassagos Dirge
-War Machine
(Others lost to the mists of time and no discernible audit trail)

Your friendly Orestes tactical controller.

Secret bomb God.
That one time I got permabanned and got to read who was being bitxhy about me :p....
GO GO DEKKER RANGERSSSS!!!!!!!!!!!!!!!!!
President of the Scooby Doo Model Appreciation Society
The only good Zod is a dead Zod
NEWGROUNDS COMEDY GOLD, UPDATED DAILY
http://badges.steamprofile.com/profile/default/steam/76561198011784807.png

 

Offline Axem

  • 211
Re: Making AI ship going backward forever
He's not just using a when, he's using

when
-> true

evaluates to true on the first frame. It's valid and I use it all the time.  ;)

Also in my experience set-object-speed-xyz just acts as an impulse. It will only set that speed for 1 frame and the game's physics will slow/speed it down/up right after.

I have used set-object-speed with some effect before, I'll have a looksie when I get home today.

  

Offline MetalDestroyer

  • Starwars reborn!
  • 210
Re: Making AI ship going backward forever
It seems the engine doesn't do anything when the speed has a negative value.

Edit: I've just notice something interesting. We can make a ship go backward without using any SEXP. Just put a negative value on $Max Velocity.
In FRED, set a default velocity to the ship you want to go backward. Execute the mission, the ship go backward until it reach 0. His speed is totally exponantial.

SEXP doesn't recognize negative value.

:/
« Last Edit: August 24, 2009, 05:32:39 pm by MetalDestroyer »