Jump to content
Sign in to follow this  
energeticsheep

Wondering how to set up an Informant

Recommended Posts

Hi c:

I've been recently creating a Hostage Rescue mission for a unit I am in and I've almost done, however I am wanting to add an informant who "Squad A" must go to and receive information on where the Hostage will be found. I've looked throughout the forums for quite some time but didn't seem to find anything. I'm fairly new to scripting but understand the basics.

Share this post


Link to post
Share on other sites

What other information could you give us?

Like how do you want the information to be given to Squad A, (more specific than just "by a message").

Kind regards,

Sanchez

Share this post


Link to post
Share on other sites

On-screen text which comes up as if the informant is talking to you, or if you're willing to suggest something better (even if it is more complex) then I'll hop on-board c:

Share this post


Link to post
Share on other sites

I can help. First, make sure that the leader of the group meeting the informant has a name, say grp1LEADER. Give the informant a name; INFORMANT will do. Then, in the informant's init field, write this:

INFORMATION attachTo [iNFORMANT,[0,0,0]]

Then, create a trigger, 2m x2m, elliptical in shape, and name it INFORMATION. Group the trigger with grp1LEADER, and make the trigger's activation Group Leader, Once, Present. In the On Act field of the trigger, write this:

null=[] spawn {INFORMANT doWatch grp1LEADER; sleep 8; INFORMANT doWatch objNull;}

Then, click on the Effects tab at the bottom of the trigger's menu. There, under the Edit Effects menu, switch Type to Text, and then write the pertinent info in the black text block at the bottom of the menu, something like this:

The hostages are being held in the building to the west of the Chardarakht market.

Or whatever.

Now, test the mission. When the leader comes within a metre of the informant, the informant will turn to him, and the text will appear. Then the informant will probably turn away. That should do if for starters.

Edited by James McKenzie-Smith

Share this post


Link to post
Share on other sites

Thank you, that helps a lot.

Finally, how would I add a Scroll Wheel Option let's say "Talk to Informant" and then hook it up to what James just told me.

Share this post


Link to post
Share on other sites

Easiest way would be to use a Radio trigger, with the On Act being:

INFORMANT_TALK = true

Then change the condition field in the INFORMATION trigger to:

true && INFORMANT_TALK

Share this post


Link to post
Share on other sites
Will that give me the Scroll Wheel Option for the text to trigger?

Radio requires pressing 0 0 1, etc. You want to use addaction instead.

Share this post


Link to post
Share on other sites
Radio requires pressing 0 0 1, etc. You want to use addaction instead.

Check out this tutorial

Arma - Addaction Tutorail Part1 (.sqf):

Share this post


Link to post
Share on other sites

I'm struggling to adapt the video which was provided to be used with a "Talk to Informant" command. I'm unsure how to link it up.

EDIT; Only just saw his other post. sorry c:

However I'm still having trouble with the addaction, even after reading the wiki.

I'd appreciate it if someone could tell me in detail how to set it up so when you face the informant a scroll-wheel option comes up saying "Talk to Informant" and when you click it the text comes on-screen.

Edited by EnergeticSheep

Share this post


Link to post
Share on other sites

Righto, I'll give it a go. In the Informant's Initialization box, put this:

this addAction ["Salaam, Sekander. Do you have any information for me today?", "INFORMANTspeaks.sqs"]

Then, minimize ArmA2 using alt-Tab. Find the folder in which the current mission is in, and make a txt file called INFORMANTspeaks.txt. Open the file, and then you have several options. The easiest is to just write this:

hintSilent "The hostages are being held in the building to the west of the Chardarakht market."

Save and exit the file, and rename it to INFORMANTspeaks.sqs. Try it out.

Other options could be to have the sqs file have something as simple as INFORMANTCONDITIONMET = true to fire off the trigger that we made a few posts back, after changing the condition for that trigger to INFORMANTCONDITIONMET.

I never use sqs files, so this is actually pretty deep waters for me, although the info is accurate; hope that you find it helpful. It was a learning experience for me!

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  

×