Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: mr.WHO on February 28, 2009, 02:34:13 pm

Title: Need help with objective error
Post by: mr.WHO on February 28, 2009, 02:34:13 pm
Hello, I have an objective:

"ship must jump out and his must be hull above 25%"  - success.
"ship hull below 25%" - fail.


Here is my script

And:
1) has departed delay
2) >  hits left (designated ship)  (25)

my problem:
No matter how much HP this ship has left during jump out - it alway say that objective fail after it's jump. also it doesn't react when hull drop below 25% (it doesn't say "objective fail" till ship jump out.

I tried this:
And:
1) has departed delay
2) NOT <  hits left (designated ship)  (25)

Problem is similar, go back to "my problem" phrase and switch word "fail"  with word "success", so no matter how much hull this ship has it say that objective is succes after jump out :(
Help.
Title: Re: Need help with objective error
Post by: Droid803 on February 28, 2009, 02:36:07 pm
Maybe you should look at PI.
They have a mission like that where you have to keep ships over a certain %.
Title: Re: Need help with objective error
Post by: FUBAR-BDHR on February 28, 2009, 02:40:41 pm
Try something like this. 

Loose
when
- <
---hits-left
--- <ship>
---25
--do nothing

Then have the debrief based on your RTB event and not loose. 

My guess is since the ship has departed it hitpoints will always be 0.   
Title: Re: Need help with objective error
Post by: mr.WHO on February 28, 2009, 02:48:01 pm
Try something like this. 

Loose
when
- <
---hits-left
--- <ship>
---25
--do nothing

Then have the debrief based on your RTB event and not loose. 

My guess is since the ship has departed it hitpoints will always be 0.   


I can't do that because I can't set Fail condition in FRED "objective menu" only Success condition, so if I do something like that:

Success
when
- >
---hits-left
--- <ship>
---25
--do nothing

The objective will be cound as success as soon as this ship arrive (coz it's hull will be 100%), that's why I put "has-departed" part.
Title: Re: Need help with objective error
Post by: FUBAR-BDHR on February 28, 2009, 03:04:22 pm
OK then set the objective to this

When
--and
----has-departed-delay
----<ship>
----not
-----is-event-true
-----loose

If that doesn't work then I need some more info.  Is the ship there at mission start?  Does the ship warp before the player, with the player, or is the player?
Title: Re: Need help with objective error
Post by: mr.WHO on February 28, 2009, 03:16:18 pm
It works!!! Thanks.

Only one more problem to go - it works, but directive won't appear, till it will be true or false :(  Any idea why?
Title: Re: Need help with objective error
Post by: FUBAR-BDHR on February 28, 2009, 03:24:02 pm
Depends on the directive and how you have it set up.  Usual cause is you have something in the directive that shouldn't be in there and should be in an event of it's own with the directive chained to it.  But that's just one of many possibilities. 
Title: Re: Need help with objective error
Post by: mr.WHO on February 28, 2009, 03:26:23 pm
I put this as directive:

When
--and
----has-departed-delay
----<ship>
----not
-----is-event-true
-----loose
Title: Re: Need help with objective error
Post by: karajorma on February 28, 2009, 03:28:19 pm
Add the optional argument to is-event-true-delay. It controls whether the event-true determines when to show a directive or if it is complete. The default is that it controls when to show a directive.

BTW, this is a directive error not an objective one. Objectives = goals in FRED and it gets confusing if people use the terms interchangeably.
Title: Re: Need help with objective error
Post by: mr.WHO on February 28, 2009, 03:31:54 pm
Add the optional argument to is-event-true-delay. It controls whether the event-true determines when to show a directive or if it is complete. The default is that it controls when to show a directive.

Can you write it in such from:
When
--and
----has-departed-delay
----<ship>
----ect.

Coz I don't uderstand what you wrote :nervous:


Edit:
I know the diffrence between directive and goal, I just had an error in both of them :)
Title: Re: Need help with objective error
Post by: karajorma on February 28, 2009, 03:37:08 pm
When
--and
----has-departed-delay
----<ship>
----not
-----is-event-true-delay
------loose
------0
------true

I'm fairly sure it's true. It might be false at the end. Don't have FRED open to check. Whichever isn't the default. :)
Title: Re: Need help with objective error
Post by: mr.WHO on February 28, 2009, 03:45:00 pm
It works, thank you.

Only one more mission to go and I'll be able to show you a demo of my project :D
Title: Re: Need help with objective error
Post by: FUBAR-BDHR on February 28, 2009, 03:54:57 pm
Good catch I was thinking goals when he said objective.  Hence my original just put it in the debrief solution. 
Title: Re: Need help with objective error
Post by: mr.WHO on February 28, 2009, 05:02:03 pm
One more thing - how to disallow (or even better hide) loadout option for specific wing at loadout menu?
Title: Re: Need help with objective error
Post by: FUBAR-BDHR on February 28, 2009, 05:04:00 pm
Disallow is the lock option in the ship editor.  Not show is just don't have it named as one of the default wings that show (Alpha,Beta, Gamma, Delta, Epsilon unless you have changed the defaults)