Jump to content
Sign in to follow this  
DZGuymed

Creating triggers with radio chatter

Recommended Posts

Basically I have an sqf file with a very simply made radio exchange between two units:

RCT1 sideChat "blah";
sleep 10;
RCT1 sideChat "blah
sleep 3;
playerunit sideChat "blah";
sleep 2;
RCT1 sideChat "blah";
sleep 5;
RCT1 sideChat "blah";
sleep 4;
RCT1 sideChat "blah";
sleep 7;
RCT1 sideChat "blah";
sleep 5;
playerunit sideChat "blah";
sleep 5;
RCT1 sideChat "blah";
sleep 7;
playerunit sideChat "Goodbye sir.";

The exchange in game is triggered by a waypoint.

What I want to do is trigger something or create a marker after the exchange is finished, but simply putting a createmarker command in the SQF after it seems to have no effect. What can I do? I'm so used to doing everything in the editor that I got totally bamboozled whenever I try to do pure scripting stuff.

I tried doing this:

RCT1 sideChat "blah";
sleep 10;
RCT1 sideChat "blah
sleep 3;
playerunit sideChat "blah";
sleep 2;
RCT1 sideChat "blah";
sleep 5;
RCT1 sideChat "blah";
sleep 4;
RCT1 sideChat "blah";
sleep 7;
RCT1 sideChat "blah";
sleep 5;
playerunit sideChat "blah";
sleep 5;
RCT1 sideChat "blah";
sleep 7;
playerunit sideChat "Goodbye sir."; 

_markerstr = createMarker ["markername",[_Xpos,_Ypos]]; _markerstr setMarkerShape "ICON"; _markerstr setMarkerType "DOT";

but I'm almost certain that's incorrect because nothing involving markers occurred in game before, during, or after the exchange.

Share this post


Link to post
Share on other sites

The markerType should be "mil_dot" or "hd_dot". "Dot" doesn't exist anymore apparently.

Share this post


Link to post
Share on other sites

Thanks, but now I have another question.

The guy that talks to the player, he has his radio triggered with the on act. field of a waypoint. (the convo is in an sqf file)

I want to make it so that when the sqf file is done being read, he will go to his next waypoint.

I tried making a global variable in the init.sqf file which is basically:

trigvar1 = 0;

And then at the end of the sqf file with the radio conversation I put this:

trigvar1 = 1;

publicVariable "trigvar1";

And then set the condition of the waypoint that he uses to talk to you as:

this getVariable "trigvar1, 1";

So basically I wanted him to get his next waypoint when the variable was changed to 1, but I'm sure I went about this wrong. I am an sqf noobie, or rather someone who hasn't used it in years. Can someone show me a better way?

Share this post


Link to post
Share on other sites
The guy that talks to the player, he has his radio triggered with the on act. field of a waypoint. (the convo is in an sqf file)

I want to make it so that when the sqf file is done being read, he will go to his next waypoint.

I tried making a global variable in the init.sqf file which is basically:

And then at the end of the sqf file with the radio conversation I put this:

And then set the condition of the waypoint that he uses to talk to you as:

So basically I wanted him to get his next waypoint when the variable was changed to 1, but I'm sure I went about this wrong. I am an sqf noobie, or rather someone who hasn't used it in years. Can someone show me a better way?

Did this not work for you? Try this:

1. Change the waypoint you want your unit to stop at and converse to a HOLD type. //HOLD waypoints will make units stay there indefinitely, units will only move for a SWITCH trigger or switch through code

2. Create a trigger. TYPE: Switch, ACTIVATED: None. Place near HOLD waypoint //Creating the SWITCH trigger

3. In it's "CONDITION" field, try: //Trigger will activate if variable is false

conversation = false

4. In the beginning of your .sqf:

conversation = true //So make the variable true

and at the end:

conversation = false //When done talking, make variable false again and trigger should activate afterwards.

5. Synchronize (F5) trigger with waypoint //If you don't do this, your trigger won't have a waypoint to switch.

This should work. However, I tested it by having the trigger set to ACTIVATED: Blufor and "present".

Edited by DreadedEntity
weird comment formatting

Share this post


Link to post
Share on other sites
And then set the condition of the waypoint that he uses to talk to you as:

this getVariable "trigvar1, 1";

You don't need to use getVariable, just put trigvar1 in the condition.

Share this post


Link to post
Share on other sites

Thanks for your responses :) I managed to get it working now.

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  

×