Author Topic: Need help once again  (Read 3298 times)

0 Members and 1 Guest are viewing this topic.

Offline Starman01

  • 213
  • Mechwarrior
    • Wing Commander Saga
Hello,

again I need some help with a strange little bug that I can't figure out. :(

I have a goal (this red SEXP one, NOT a mission objective) that refuses to show up in white letters in the objectives box. I tried many variants, but it isn't working. Strange issue, once completed it shows up in blue letters at the correct time, like it is supposed to do.

The SEXP is chained within many more chained SEXP. After the goal should have appeared, about a minute later the goal should become true/complete. I made something similar in another mission, and it worked fine. I also tried to use different length of the objective text, in case the windows does not update properly. But that didn't worked either.

So what's the deal, did I maybe brake a max-limit of objectives ? There are currently 8 goals in the mission. I also tried to make the following events not chained to that special goal, but it had no effect either.

For better explanation, here is a picture :



The event "goal follow Alpha1" should enter the objective box in white letters right after "M_computer 19" has been executed, and should be complete 55 seconds later (which happens, and it suddenly appears in blue letters in the objective box.)

Once the goal is completed, "M_Major Baws 13" will be executed (which also works fine to the correct time). This is really driving me crazy, anyone got an idea ?

Thanks in advance

Starman©




« Last Edit: November 12, 2005, 12:33:13 pm by Starman01 »
MECHCOMMANDER OMNITECH

9 out of 10 voices in my head always tell me that I'm not insane. The 10th is only humming the melody of TETRIS.

 

Offline Nuclear1

  • 211
I've had this issue myself. For some reason, directives don't like "is-event-true-delay" to be the only trigger. Is there any major event that happens at around this same time (i.e. does a ship arrive/depart?) or does the player fly towards a specific waypoint? Using distance to waypoints or arrivals always seems to remedy this kind of issue for me.
Spoon - I stand in awe by your flawless fredding. Truely, never before have I witnessed such magnificant display of beamz.
Axem -  I don't know what I'll do with my life now. Maybe I'll become a Nun, or take up Macrame. But where ever I go... I will remember you!
Axem - Sorry to post again when I said I was leaving for good, but something was nagging me. I don't want to say it in a way that shames the campaign but I think we can all agree it is actually.. incomplete. It is missing... Voice Acting.
Quanto - I for one would love to lend my beautiful singing voice into this wholesome project.
Nuclear1 - I want a duet.
AndrewofDoom - Make it a trio!

 

Offline Starman01

  • 213
  • Mechwarrior
    • Wing Commander Saga
Hm, not really. This is the very first mission, and you just fly in formation around your carrier group following your leader, since you are supposed to be only a bloody rookie :)

But now that you mention it, the working goal in the other mission does have 2 triggers, one "event-true" and one "key-pressed".

I try checking the distances  for the leading in relation to other ships. He flies always the same paths, maybe I can make use of that. If that's the reason, than I think I should even mantis this issue :)
MECHCOMMANDER OMNITECH

9 out of 10 voices in my head always tell me that I'm not insane. The 10th is only humming the melody of TETRIS.

 

Offline Sesquipedalian

  • Atankharz'ythi
  • 211
It'd be easier to add a has-ship-arrived-delay and set it to the ship the player is supposed to follow.
Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

The Scroll of Atankharzim | FS2 syntax highlighting

 

Offline Starman01

  • 213
  • Mechwarrior
    • Wing Commander Saga
I don't think this will work in this matter, since the ship is in the area right from the mission start.

Now, it's like Nuclear1 said, the "is event true" is the reason to blame. I made another trigger, and now the goal shows up and work as it should. Pheew, I would have never thought that this is the problem, thanks mate :)

However, to be fully happy, I must figure out another bug with this goal now. It looks like this here now :



Now the goal becomes true when it should, but I'm unable to get it "false" (because I want to end the mission then).

The goal should become true, when Alpha 1 is closer than 100 klicks to waypoint "Alpha-Move 4" AND the player is closer than 200 clicks to him.

On the other hand, the goal should become false, when Alpha1 reach the waypoint, and the player is more than 200 klicks away.

I tried doing this with "and in sequence", but then the goal becomes false right after it appears into the directive windows.

How must I change the goal, so that it can become false too, so that I can check it with "is event false" in another SEXP ?
MECHCOMMANDER OMNITECH

9 out of 10 voices in my head always tell me that I'm not insane. The 10th is only humming the melody of TETRIS.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
I tried doing this with "and in sequence", but then the goal becomes false right after it appears into the directive windows.

You have to be very careful using and-in-sequence together with the not operator. Almost every time I've heard of a problem with it, it's because someone made the exact same mistake you did.

What you probably did was this.

when
-and-in-sequence
--Trigger A
--Not
---Trigger B

The problem with that is that Not Trigger B comes true the second the mission starts and therefore the entire SEXP instantly evaluates to false. So having not has arrived or not is-destroyed-delay as the trigger is always going to evaluate to false. What you should do is have Trigger B in it's own event and then do this.


when
-and-in-sequence
--Trigger A
--is-event-true-delay
---Trigger B

That way the Trigger B event will constantly evaulate to incomplete until something happens that makes it true or false.


Anyway now that that is out of the way here's how I'd probably solve this one.

Alpha 1 reaches node
when
-<
--distance
---alpha 1
---Alpha-Move:4
--100
do-nothing

Goal Follow Alpha 1
when
-and
--is event true
---Alpha 1 reaches node
---0
--not
---is-is-event-true
---Alpha 1 reaches node
---1
--<
---distance
----alpha 1
----alpha 2
---200
do-nothing


The above event gives the player 1 second to get within 200m of Alpha 1 after it reaches the node (Be VERY careful with not is-event-true. It will evaluate to true the second you start the mission. It's only safe in this event because the other event is always going to be false at the start of the mission and there is only a one second overlap where the two are both true).
« Last Edit: November 13, 2005, 10:52:04 am by karajorma »
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Starman01

  • 213
  • Mechwarrior
    • Wing Commander Saga
I try, but that will bring the previous problem again. When you use the "is event true" trigger inside a directive SEXP, the directive will not show in white letters in the directive box. This bites :(
MECHCOMMANDER OMNITECH

9 out of 10 voices in my head always tell me that I'm not insane. The 10th is only humming the melody of TETRIS.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Does anyone know a reason why the is-event-true thing isn't a bug? Cause if not we should get that fixed and end the problem if possible.

I would have thought that since is-event-true is now no longer the only trigger it would have worked. If it doesn't this should work even if it's a bit more wasteful in SEXPs.


Alpha 1 reaches node
when
-<
--distance
---alpha 1
---Alpha-Move:4
--100
Modify a variable to equal 1

Chained to the above. 1 second delay
when
-true
Modify a variable to equal 0 again.



Goal Follow Alpha 1
when
-and
-Variable = 1
--<
---distance
----alpha 1
----alpha 2
---200
do-nothing
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

  

Offline Starman01

  • 213
  • Mechwarrior
    • Wing Commander Saga
I tried your first method now. It seems you were missing and additional "and" condition in it.

Here is what I did now :



I first made a trigger, then the goal and in another event (not visible here) I end the mission if the goal becomes false.

It works now, that the goal will become true or false to the correct time, but as said, due to the "is event true" it isn't displayed in white again :wtf:  I posted a bug in mantis for this.

I would have wished, that the goal will display in white, but I guess I will have to live with that. At least the player get's ordered to fly in formation with a voice-line, so he should know what to do. Also the the goal-failure will display in red for a few seconds, and the players get's beat up in debriefing to know what he made wrong :)

Maybe I can get a fix for this issue in a couple of weaks.
MECHCOMMANDER OMNITECH

9 out of 10 voices in my head always tell me that I'm not insane. The 10th is only humming the melody of TETRIS.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
I didn't miss an AND.

AND
-A
-B
-C

is exactly the same as

AND
-A
-AND
--B
--C

Except that it wastes an extra SEXP node.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Starman01

  • 213
  • Mechwarrior
    • Wing Commander Saga
Can this be built at all ? I tried, but I wasn't able to insert another conditional at this point, that's why I made this "and-and" thing. It looks strange, and I was even more suprised that it worked, but so it does. :)

Nevertheless, you once again pointed me into the right direction. Thanks for the info (and nuclear1 too)  :)
MECHCOMMANDER OMNITECH

9 out of 10 voices in my head always tell me that I'm not insane. The 10th is only humming the melody of TETRIS.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
The add operator function from the pop up menu should have allowed you to do that easily. AFAIK there's no upper limit on the number of SEXPs you can use in one AND or OR SEXP. Well at least not one that anyone who's building a sensible mission has ever mentioned on these boards :)


I still reckon that using variables would get you your directive back though. Still it's a good idea to get the bug fixed if possible.

EDIT : While I'm on about limits I wonder what the maximum number of events you're allowed in a single event actually is. Cause in a MindGames mission I found it necessary to do this :)



There are another 4 in the AND and six entries in the any-of too :)
« Last Edit: November 14, 2005, 04:48:22 pm by karajorma »
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
INT_MAX, theoretically. ;) Practically, I dunno.  It should work fine up until you hit the actual sexp limit.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Yeah. I figured that much is true and I doubt I'll be needing to make events that big very often so I doubted it would be a problem anyway :)
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Starman01

  • 213
  • Mechwarrior
    • Wing Commander Saga
Well, the SEXP-Limit shouldn't be a problem anymore, though I rather refuse making SEXP with so many operators (guess I tried to insert it at the wrong place in our example here, that's why it didn't work). However, I noticed many timed that sometimes conditionals are simply skipped inside the mission which can lead into heavy scripting error or simple not the effect you want to have.

I'm not sure why or what conditionals are skipped, but I noticed this ecspecially very often with AI-Goals (i.e. using "clear goals" and add a new one in a single SEXP, or using the same operator twice or more often). Therefore I rather make more events, so I can assure that they will be executed. Now that the SEXP-Limit has been sucessfully bumped up, it's not such a big deal (a few of my mission have more than 150 events :) )
MECHCOMMANDER OMNITECH

9 out of 10 voices in my head always tell me that I'm not insane. The 10th is only humming the melody of TETRIS.

 

Offline Starman01

  • 213
  • Mechwarrior
    • Wing Commander Saga
Sorry, but I need to bump up that thread again. I tried many variants, but I'm not getting this problem here solved to my liking. This is extremly painfull, because it sounds like such a simple matter . Make a goal and check if the player stays in formation or not.

Could someone please post me the complete SEXP's or give me a test mission where I can take a look or copy the SEXP out ? The effect should be as follows:

The player should receive a goal (with a voice-line and with the white text in the directives box) to "Follow his leader". The leader ship is then flying to a few waypoints, and once he reached the last one, there should be checked the following :

When the leader has reached the last waypoint, and the player is closer than 400 clicks to him, the goal is completed and the next SEXP (a dialouge) can run.

If the leader reaches the specific waypoint, and the player is away more than 400 cllicks to him, the goal should become false and the mission should end 5 seconds later.

Sounds simple ? I thought so myself :D.   The problem is, that the directive text isn't displayed when you use the "is event true" in the goal SEXP, so it must be built in another way (but checking the distant to the last waypoint should do the trick).

I haven't tried the variable stuff Karajorma posted above yet, somehow I don't get it working (I haven't used variables before so I'm not very familiar with).  Any help would be really appreciated.

Thanks

Starman
MECHCOMMANDER OMNITECH

9 out of 10 voices in my head always tell me that I'm not insane. The 10th is only humming the melody of TETRIS.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
My FAQ has a pretty detailed explaination of how to use variables. Take a look at it. I'm pretty sure that the event I posted would work for you.

If not strip the mission down to the bare essentials, post it and I'll take a look.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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