Author Topic: Advanced fred question  (Read 2026 times)

0 Members and 1 Guest are viewing this topic.

Offline madaboutgames

  • 29
  • Heatemup People!
    • The Heat Em Up Web site
Advanced fred question
In the EMW - Earth Minbari War campiagn the minbari ships use stealth tec, so the ea have trouble locking on.  I have currently set the minbari to be invisible to sensors, but what i would prefer to do if possible is - set all minbari ships so that when targeted by player, the target is lost after 1 or 2 seconds. I want to use this everytime a minbari is targeted.
For example when i target a minbari fighter, it would be targeted and show up i the target window, but after 1 or 2 seconds of targeting that fighter, the target resets and nothing is targeted.  This would happen every time the player would target a minbari ship.  This would give a better look and feel to just steeing the minbari as hidden from sensore.

Anyone have any ideas how to do this, or a variable that would do the trick?

Cheers in advance  ;)
*The Earth Brakiri War*
*B5 Star Fury Pilot*

Are You Ready?  Find Out!
www.heatemup.co.uk

Visit  -  http://proxima-fleet.com for the heatemup Forums.

 

Offline Shade

  • 211
Re: Advanced fred question
Yep, that is pretty advanced :p You need three things: two events and a variable. One event to make ships stealthy shortly after they've been targeted, one to unstealth them again afterwards, and the variable for timing the second event to go off a few seconds after the first instead of immediately, as otherwise the target won't be lost.

Make a variable called Mission_Time and initialize it to 0, then set up the events as follows.

Stealth Event:

-op every-time-argument
  -op any-of
    - <list of ships to be regularly untargeted>
  - op targeted
    - <argument>
    - 2
  - op ship-stealthy
    - <argument>
  - op modify-variable
    - Mission_Time(0)
    - op mission-time



Unstealth Event:

-op every-time-argument
  -op any-of
    - <list of ships to be regularly untargeted>
  - op and
    - op is-ship-stealthy
      - <argument>
    - op <
      - op +
        - Mission_Time(0)
        - 2
      - op mission-time
  - op ship-unstealthy
    - <argument>



That will do the trick. Here is a test mission I made that shows it in action.
Report FS_Open bugs with Mantis  |  Find the latest FS_Open builds Here  |  Interested in FRED? Check out the Wiki's FRED Portal | Diaspora: Website / Forums
"Oooooooooooooooooooooooooooooooooooooooh ****ing great. 2200 references to entry->index and no idea which is the one that ****ed up" - Karajorma
"We are all agreed that your theory is crazy. The question that divides us is whether it is crazy enough to have a chance of being correct." - Niels Bohr
<Cobra|> You play this mission too intelligently.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Advanced fred question
I was all happy when I saw a topic called Advanced FRED Question and then all unhappy that Shade got to it before me :p

Good answer. It's going straight into the FRED Cookbook next time I update the FAQ :)
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline madaboutgames

  • 29
  • Heatemup People!
    • The Heat Em Up Web site
Re: Advanced fred question
Great stuff, cheers.  I will give it a try tonight.  You might even even earn yourself a place in the credits :)
*The Earth Brakiri War*
*B5 Star Fury Pilot*

Are You Ready?  Find Out!
www.heatemup.co.uk

Visit  -  http://proxima-fleet.com for the heatemup Forums.

 

Offline Trivial Psychic

  • 212
  • Snoop Junkie
Re: Advanced fred question
IIRC, ship-stealthy requires that the ship have $stealth: in its tables.  The Nial doesn't.  You may want to use ship-invisible instead, which results in it appearing as a flashing red dot on the radar, but can't be locked-on to.  BTW, Den5's ITB campaign, has Minbari ships untargettable ONLY at their first meeting.  I guess he found combat with that many untargettable Nials to be too difficult.
The Trivial Psychic Strikes Again!

 

Offline Shade

  • 211
Re: Advanced fred question
It works fine - I tested it with Dragons before posting. Or try the test mission and see for yourself :)
Report FS_Open bugs with Mantis  |  Find the latest FS_Open builds Here  |  Interested in FRED? Check out the Wiki's FRED Portal | Diaspora: Website / Forums
"Oooooooooooooooooooooooooooooooooooooooh ****ing great. 2200 references to entry->index and no idea which is the one that ****ed up" - Karajorma
"We are all agreed that your theory is crazy. The question that divides us is whether it is crazy enough to have a chance of being correct." - Niels Bohr
<Cobra|> You play this mission too intelligently.

 

Offline madaboutgames

  • 29
  • Heatemup People!
    • The Heat Em Up Web site
Re: Advanced fred question
Started putting the 15th mission together last night so i decided to try the targeting in that mission using nials, sharlins and lintras.  Didnt seem to work right, I will try trivs suggestion tonight using ship invisible.  The solution should work though as the test mission supplied worked fine.  In dens campiagn he used untargetable in the first mission only then targetable in the rest.  I went by how ITB played out and the B5 epsiodes relating to the Earth Minbari war.  In the EMW campiagn, the first mission is targetable as in ITB, when they first meet the minbari they have trouble with scanners locking on.  They could target them in the first one until the Minbari went mad and put their stealth tech to good use.  After the first mission the minbari use the stealth tech wich makes them quite hard to locate and dogfight with which is why earth didnt do so well in the war.  I have adopted this idea in EMW as I want to keep it as close as possible to ITB and have some enjoyable gameplay at the same time.  Den probably took the opposite approach because it is quite difficult to takt out minbari fighters when you cant lock on.  This is why using this targeting system would be more realistic and like ITB.  It makes it easier for the player because they can target the minbari but only for a couple of seconds at a time.  At least the player will momentarily be able to locate minbari fighters which will point them in the right direction as well as seeing how much hull they have left, distance etc.  I think this approach would be better than targeting the minbari as this defeats the facts of the earth minbari war.
*The Earth Brakiri War*
*B5 Star Fury Pilot*

Are You Ready?  Find Out!
www.heatemup.co.uk

Visit  -  http://proxima-fleet.com for the heatemup Forums.

 

Offline Dwin

  • 26
Re: Advanced fred question
I dont think that will be very good for gameplay. Personally, I'd find it fustrating to have to repeatedly lock on to the target. It's frustrating enough as it is trying to hit them, the last thing I need is difficult in simply maintaining a lock.

 

Offline Trivial Psychic

  • 212
  • Snoop Junkie
Re: Advanced fred question
One could always have enemies untargettable (IE, ship-invisible) beyond a certain distance, say 500m.
The Trivial Psychic Strikes Again!