OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: 45mDex on 18 Feb 2004, 05:36:01

Title: Making a mission end??
Post by: 45mDex on 18 Feb 2004, 05:36:01
Okay, I want to make a Multiplayer mission end and am not sure how to accomplish this.

I have my team arriving on Everon. They meet an informant to get some information. After the info exchange, you are being hunted by East forces. Your objective is to escape the island. Now how do you make the mission end using game logics and scripts if you want your team to escape to the ocean?? My main problem is that I want to put a trigger down so that when our team runs over it, the mission is over. But, how do you accomplish this if my team has already run over the trigger when arriving on the island??

I've tried experimenting with true/false variables, does'nt seem to be helping; also messed with game logics, can't figure it out, i'm sure it's just syntax, but i don't know, any thoughts anyone??
Title: Re:Making a mission end??
Post by: Artak on 18 Feb 2004, 08:39:29
You can place a big trigger which detects if the units are in the trigger area or not AND have met with the informant.

Group the group with the trigger and select from the activation drop down menu 'whole group' or something.
Set the activation by 'not present'
Select the trigger type to 'end1'
Put in the on activation line 'this and meeting'

Make 'meeting' variable true by inserting a small trigger near the informant. Group it with the player group and set it to 'present'. Type in the on activation line 'meeting=true'
Title: Re:Making a mission end??
Post by: Marvin on 18 Feb 2004, 09:07:44
Or you can use the command as
Forceend
Title: Re:Making a mission end??
Post by: myke13021 on 18 Feb 2004, 14:28:50

Put in the on activation line 'this and meeting'


i think you meant to put this in the Condition line, not on activation.
Title: Re:Making a mission end??
Post by: Artak on 18 Feb 2004, 16:45:21
Umm.. Right.  :-X
Title: Re:Making a mission end??
Post by: 45mDex on 18 Feb 2004, 17:31:10
Okay, you guys are giving me good ideas, but still a little fuzzy here. You want me to create the trigger that will end the mission, and this trigger will have 2 variables 'meeting' and 'my group'. Now I can define 'meeting' as being false in my init.sqs, but setting it to true when I meet my informant??

And as far as 'my group', how would I create the trigger to detect if my whole squad was present?? I know you guys don't have much to go on, but a syntax example would be great. Please keep the ideas coming.

By the way, Myke, I used your advice to create a really cool conversation using game logics, that was really cool.
Title: Re:Making a mission end??
Post by: myke13021 on 18 Feb 2004, 18:33:25
ok, basically you can use a "not present" or either a "present" trigger.
Once you grouped this trigger with your group (same way as you add another unit to a froup), there will be some new options in the trigger, as "Grp Leader present/not present", "Grp present" and some others.

The idea is, to set the trigger size that it covers the whole mission area, and use the "Grp not present" to fire the trigger. Don't care when your Group starts outside the trigger, the trigger wont fire as we put a SECOND condition in that has been done.

As Artak said, in the Condition box put

this AND meeting

"this" refers in this case to the settings of the trigger you defined above, and the "meeting" variable has to be true for the trigger to fire.

As you guessed right you define the "meeting" variable in your init.sqs as false.
Switchin it to "true" is pretty simple. I guess you make something happen when you meet your informant (cutscene, conversation). Just use "meeting true" somewhere in the stuff that runs there.

:edit:
i just saw your old topics were still active. Please, once your prob is solved, hit the "solved" button at bottom left....whenever you think there's still something you need to know about, you can unsolve it at any time.
Title: Re:Making a mission end??
Post by: Artak on 19 Feb 2004, 15:17:49
Quote
As you guessed right you define the "meeting" variable in your init.sqs as false
No need to. When asking OFP if a boolean varaible is true, it either is or it isn't :D. hehe I mean, if it's true, it's true, but if it's anything else, it's false. Even if the value is null, it's still false.   :)
Title: Re:Making a mission end??
Post by: myke13021 on 20 Feb 2004, 04:33:19
No need to. When asking OFP if a boolean varaible is true, it either is or it isn't :D. hehe I mean, if it's true, it's true, but if it's anything else, it's false. Even if the value is null, it's still false.   :)

uhm...ya...ok....didn't knew that...guessed that OFP would say something like "error: unknown variable"..but i guess you're right.

But to keep some glance on my reply...i think it is more "elegant" to define it's value...just to show you do things right.... ;D
Title: Re:Making a mission end??
Post by: 45mDex on 20 Feb 2004, 16:18:36
It works!!! Thanks Artak, myke13021, and Marvin. This is cool stuff being able to mess with variables.One final question though... what exactly are you talking about Artak in your last post about not needing to define values as true or false in the init.sqs??

 ;D
Title: Re:Making a mission end??
Post by: myke13021 on 20 Feb 2004, 18:47:33
look it like this....a not defined variable is presumed as to be "false".

It only means, whenever you check a variable which isn't defined, OFP guesses it is false.

So you don't have to define the variable explicit in the init.sqs. When you have a trigger that checks a non existing variable, it will not fire as it presumes non existent is equivalent to false.

I just thinks it is some sort of "keep things straight" when you predefine a variable, but this is my very own personal opinion.
Title: Re:Making a mission end??
Post by: 45mDex on 20 Feb 2004, 20:25:58
Very cool, I'll play around with that. Question solved!!