Author Topic: Two FRED questions  (Read 2696 times)

0 Members and 1 Guest are viewing this topic.

#1. Why cannot an event be triggered true by an event that comes after it in the list? This seems ridiculous to me. See: what I'm trying to do is created an infinitely-looping chain of events, but my efforts to make the chain of events actually... loop have been defeated.

What I have right now:
Code: [Select]
Event 1

Event 2
|_when
    |_or
        |_ is-event-true-delay
            |_Event 1
        |_ is-event-true-delay
            |_Event 4

Event 3
|_ when
     |_is-event-true-delay
         |_Event 2

Event 4
|_when
    |_is-event-true-delay
        |_Event 3

Suggestions?


#2. I've been trying to make a ship invisible to sensors at first but have it appear later. One of those "track down the disabled ship in the nebula" missions. So: I've tried having the opening event (which triggers true after 0 seconds have elapsed) use the ship-stealthy SEXP. Then I have a later event use the ship-unstealthy SEXP. Problem is: the initial ship-stealthy SEXP never triggers. This is surprising because the other stuff in the event triggers just fine. So, I try making the ship "Hidden from Sensors" via the Misc. button in the Ships Editor. Of course... the ship-unstealthy SEXP doesn't seem to work when a ship is hidden from the beginning. I'm wondering if I should just use the ship-create SEXP in conjunction with a couple of ship status-altering SEXP's  to make it appear damaged. My question is: what's wrong with the cloak/decloak SEXP's?
"You need to believe in things that aren't true. How else can they become?" -DEATH, Discworld

 

Offline Shade

  • 211
1) You problem there would seem to be that event 2 has already become true for the rest (3 & 4) to trigger, thus it won't happen again when 4 becomes true. Events just aren't designed to be fashioned into loops, so it's gonna be difficult. I can't think of any easy way to do it actually, and i've never tried it myself so I can't give you a tried-and-tested solution either.

My best shot at how it might be done would be to not trigger the events based on a previous event becoming true, but by variables hitting a certain number. That way you could put a high repeat count on the events you want to loop and modify the variables to determine whether an event can trigger or not. I'm thinking something like this:

Event 1: Do stuff, set event2 variable to 1.
Event 2: Can trigger when event2 = 1. Does stuff, and sets event2 variable to 0 so it won't repeat, sets event3 variable to 1.
Event 3: Can trigger when event3 = 1. Does stuff, sets event3 to 0, sets event4 to 1.
Event 4: Can trigger when event4 = 1. Does stuff, sets even4 to 0, and finally sets event2 to 1 to let the whole loop repeat.

Could use every-time instead of a repeat count, but would need a safeguard against event 1 going off more than once. This might work, might not, but it's the best idea I've got at the moment.

2) Try using ship-invisible instead. When using a sexp to set it, also make sure that the ship is actually in the mission when the sexp triggers.
« Last Edit: November 18, 2006, 10:20:48 pm by Shade »
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.

 
or Hunter, set the visibility setting under the nebula editor lower, and tell the ship that you're following to not stray too far away from you. Easier said than done, but you can figure it out. have you tried that trick I told you about?

    |[===---(-         
    ||
 =(||==)_
    ||_____|
 =(||==)
    ||                   
    |[===---(-                             

"Take my love. Take my land. Take me where I cannot stand. I don't care, I'm still free. You can't take the sky from me. Take me out to the black, tell them I ain't comin' back. Burn the land boil the sea, you can't take the sky from me. There's no place I can be since I've found Serenity. But you can't take the sky from me." - Ballad of Serenity

 
 :rolleyes:


Spartan, it's not visibility I'm worried about, it's the ship's radar signature.


@Shade: Alright, I'll try that. I know that looping event sets are possible because I can think of at least one that I've seen in a campaign...

This would be a whole lot easier if I just knew how to code that stupid music.tbl.....
"You need to believe in things that aren't true. How else can they become?" -DEATH, Discworld

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
The biggest problem I see is that all four events will evaluate to true in the first frame. I really can't see what you're trying to do here.

If any event is set to loop it will also trigger every repeat too. There's no way to break the chain of executions.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Shade

  • 211
Hm, true. They would. No way it could work like I described... I blame posting at 3am for that little bit of idiocy :p Would need to have the variable evaluation paired with at least one more conditional using 'and', with the different events having mutually exclusive conditionals to keep it from looping every frame.

For example, event 2 could also require a ship to be within 100m of location A, and send it towards location B on execution. Event 3 needs it within 100m of location B and thus has to wait for it to get there before it can execute, etc. That should create a delay. And of course it could be anything and not necessarily a moving ship, as long as it will keep the events from going off immediately.
« Last Edit: November 19, 2006, 10:31:29 am by Shade »
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.

 
So what you're saying is that after triggering true, each event would also have to be triggered false before they repeated? I'm not sure that's... possible... :doubt:

"You need to believe in things that aren't true. How else can they become?" -DEATH, Discworld

 

Offline Turey

  • Installer dude
  • 211
  • The diminutive form of Turambar.
    • FreeSpace Open Installer Homepage
is this what you're looking for?

loop.fs2
Creator of the FreeSpace Open Installer.
"Calm. The ****. Down." -Taristin
why would an SCP error be considered as news? :wtf: *smacks Cobra*It's a feature.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
So what you're saying is that after triggering true, each event would also have to be triggered false before they repeated? I'm not sure that's... possible... :doubt:

What we're saying is that the entire set of events is screwed up because they'll all instantly come true the second the mission started.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

  
:rolleyes:
Spartan, it's not visibility I'm worried about, it's the ship's radar signature.

I know Hunter, that's what I was saying. If the ship's radar signature is unknown, and you have the visibility just right, and have the ship stay close to you, the radar should read it as a grey spec.

    |[===---(-         
    ||
 =(||==)_
    ||_____|
 =(||==)
    ||                   
    |[===---(-                             

"Take my love. Take my land. Take me where I cannot stand. I don't care, I'm still free. You can't take the sky from me. Take me out to the black, tell them I ain't comin' back. Burn the land boil the sea, you can't take the sky from me. There's no place I can be since I've found Serenity. But you can't take the sky from me." - Ballad of Serenity