Jump to content
Sign in to follow this  
Jimmy the Saint

Implementation of Optional Dialogs: Player/AI Units

Recommended Posts

Hello,

I'll try to describe my problem/question as detailed as I can.

The specific scenario I have planned so far is that a squad of USMC will be dropped off at a landing zone by helicopters. While that happens, the leader of the squad detects a group of “maybe civilians†running towards the landing zone. So for the safety of causalities the leader will tell his fire teams to check their fire and not to shoot on first sight until they have left the chopper and secured the landing area. Now after everybody of the USMC squad has left the helicopter, the player should be able to see this group of civilians coming closer to him until they stop close by at a waypoint, waiting for the player at a bit of a distance so the player has to interact with the civilians. This means that the player has to get closer to the civilians until the “greeting-option†aswell as the “dialogue options†with all the standardized questions/answers appears and gives the player the option to ask something. However, for the planned scenario there has to be some specific or mission related "dialogue option" before the civilians run away. But there has also to be an optional trigger which should get activated when the player waits too long to talk with the civilians or decides not to interact with the civilians. So in consequence this means, that the civilians loose their "special dialogue options" and run away without saying anything.

At the moment I got so far that the squad leader detects and warns his fire teams of civilians. The helicopter does land and drop off the USMC soldiers. The civilians come to the LZ and stop at the nearby waypoint. But I'm not able to integrate the optional dialogue options, nor the timeout trigger for the player ability of questioning. All I was able to script is a (storytelling) global chat which appears as soon as these civilians reach the LZ waypoint before they keep running away.

*edited some grammar mistakes.

Edited by Jimmy the Saint

Share this post


Link to post
Share on other sites

For adding dialogue (not dialog)... I'm not sure how to other than with addAction but I'm sure there's a section for actual dialogue also, like how you can ask ppl about targets & weather.

For the other part, the trigger...

You could just make it so that once you land, a script starts and makes the civilians go away after a certain time unless a condition is met/variable is a certain value. So like (don't use this obv, just pseudo)...

//execute this once landed
sleep 300;   //this will give the player 5min

if hasTalked is 0 then:  //hasTalked needs to be a global variable
civilians flee for their lives

And in the dialogue options of the civilians, just make it so that when activated, hasTalked is assigned a value other than 0, so that condition is not met and they dont run away when the timer runs out. Make sense?

Share this post


Link to post
Share on other sites

Thank you JDog, I'm going to test your suggestion. :)

*update: I've tried your advise, but I can only set up the first part of the trigger of which the AI unit waits for a certain time until it moves on to the next waypoint.

-I haven't worked with so called "global variables" yet. I guess they're supposed to be connected to triggers and need to be unique, similar to those variables given to usual units, like soldiers, cars and aircrafts? (I've read that their variables are global variables too?)

- I don't know how to initialize or use independent variables expect if they're connected to a unit (like a car, aircraft etc.) and their corresponding trigger. Are they used with the game logic entity? I’m sorry, but I'm pretty green when it comes to ArmA2 scripting and I should probably mention that I'm just using the ingame editor at the moment and haven't worked with any extern .sqf or .sqs script files. By the way, somewhere it was written that it's better to use global variables/triggers which get activated by a extern .sqf file to create multiplayer mission because those .sqf script files don't produce such heavy data-loss or infamous online desync. Is that true? Well, I was planning to make my scenario a COOP mission, which is almost done, except the little (story) details which do make a mission interesting.

Edited by Jimmy the Saint
tried to correct some grammar mistakes

Share this post


Link to post
Share on other sites

I'm sorry to bump this thread, but I still haven't solved this problem and thought that maybe somebody is able to come up with a helpful idea and lend me hand. :butbut:

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×