Jump to content
Sign in to follow this  
Rexxenexx

Stupid question about enableradio

Recommended Posts

I put enableradio false at the top of the init.sqs then have some camera animation then enableradio true

Still the AIs call out targets??? I want them to shutup through the whole intro right when the mission starts tounge.gif I tried putting the whole intro into into its own script "intro.sqs" and calling inside init.sqs by using []exec "intro.sqs" doesnt work. And calling it w a trigger doesnt shut them up either.

What am I doin wrong??

TIA

Share this post


Link to post
Share on other sites

CRUDOLA!

I forgot to say one very important thing!!! I works perfect when previewing it, but once I put it on the server and multiplayer it it doesnt seem to work!

Share this post


Link to post
Share on other sites

how about enableRadio false at the beginning of intro.sqs, and enableradio true at the end of the script, just before "exit" ?

just a suggestion wink.gif

Share this post


Link to post
Share on other sites

Here is my intro.sqs:

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">

enableRadio false

titletext ["- Rexxenexx Presents -","BLACK IN",9]

_campos = GetPos cam1

_camx = _campos select 0

_camz = _campos select 1

_camy = _campos select 2

_cam = "CAMERA" camCreate [ _camx, _camz, _camy+48]

_cam cameraEffect ["internal", "Left"]

_cam CamSetTarget cam1target

_cam CamCommit 0

_campos = GetPos cam2

_camx = _campos select 0

_camz = _campos select 1

_camy = _campos select 2

_cam CamsetPos [ _camx, _camz, _camy+20]

_cam CamSetTarget cam1target

_cam CamCommit 10

~9

titletext ["","PLAIN",6]

~1

cuttext ["Infiltrate: Mission Two","PLAIN",6]

_campos = GetPos cam3

_camx = _campos select 0

_camz = _campos select 1

_camy = _campos select 2

_cam CamsetPos [ _camx, _camz-5, _camy+10]

_cam CamSetTarget cam1target

_cam CamCommit 10

~5

cuttext ["- Vultures Nest -","PLAIN",6]

~5

cuttext ["","PLAIN",6]

~2

cutText ["", "BLACK OUT",3]

~3

_cam CameraEffect ["terminate", "back"]

CamDestroy _cam

cutText ["", "BLACK IN",2]

enableRadio true

exit<span id='postcolor'>

I call it in the init.sqs by []exec "intro.sqs". I even tried to put enableRadio false in the init.sqs to force it, but still on the server the AI manages to blab  tounge.gif

Share this post


Link to post
Share on other sites

I don't think it is possible to stop the radio on MP, unless anyone knows diffrent?

RED

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Rexxenexx @ Sep. 16 2002,09:46)</td></tr><tr><td id="QUOTE">anyone know different??? confused.gif<span id='postcolor'>

Don't use the init.sqs - init.sqs gets executed after mission starts, not during initialization. Put the enableradio false in the init line of a gamelogic, so it is already set when your intro starts.

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">init.sqs gets executed after mission starts, not during initialization.<span id='postcolor'>

Not really true:

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">init.sqs - launched when mission is started (before briefing screen)

- no arguments<span id='postcolor'>

For the intro initialisation we've got another auto-executable

script:

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">initIntro.sqs - launched when intro is started (since 1.50)

- no arguments<span id='postcolor'>

Only one thing, i encountered when using initIntro.sqs,

It was launched at intro, and at outro. (looks funny, if you

display a titletext message with the actual time, and it's

the same time at intro and at outro)

~S~ CD

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (DV Chris Death @ Sep. 16 2002,14:48)</td></tr><tr><td id="QUOTE">init.sqs - launched when mission is started (before briefing screen)

   - no arguments<span id='postcolor'>

Well, in Multiplayer this is a little bit different - when working on my coop missions I found the commands from the init.sqs to be executed only after the mission itself started. I was wondering myself why enableradio false didn't disable the radiomessages - it was set in the init.sqs, first line. If a unit was seeing the enemy right from the beginning I always got those annoying "officer 10 o'clock" messages during the beginning of the intro. Only after using a gamelogic's init line to disable the radio these messages could be avoided.

So obviously in MP games the init.sqs only executes after the briefing, right when the mission itself starts.

Share this post


Link to post
Share on other sites

Joltan, sorry to say that, but again no this is not true

If you create a random variable in multiplayer, by using

the init.sqs, it will get the same value for host and all

clients. While creating a random variable after briefing,

it generates different values.

The problem, you are talking about (commands from init.sqs

will be executed after briefing) is just a logical thing.

Those commands can't be executed before the game starts.

The init.sqs should be used, to what it's supposed to be:

INITIALISATION - prepare strings/variables, conditions.

You can't expect the init.sqs to run e.g: an action command,

before the mission itself is running wink.gif

~S~ CD

Share this post


Link to post
Share on other sites

And btw - just for that enable radio thingy;

you should put it into the init-field of the player as first

statement. This would be the very first executed command,

when the intro/mission/outro starts.

~S~ CD

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (DV Chris Death @ Sep. 16 2002,18:29)</td></tr><tr><td id="QUOTE">you should put it into the init-field of the player as first

statement. This would be the very first executed command,

when the intro/mission/outro starts.<span id='postcolor'>

MP missions don't have intro/outro, just cutscenes that get executed ingame. Putting the enableradio command in the init of a gamelogic has a big advantage to putting it in the init of the players: you only need to type it once!  biggrin.gif

BTW: What you describe about the random variables set the same on all clients if using the init.sqs, that just means the random command it is executed only on the server with the variables set by the script being distributed to all clients (never tried random values in the init.sqs, you sure it works that way)?

You really got to differenciate if you are talking about singleplayer or multiplayer editing in this case. I'm sure init.sqs is executed before mission start in singleplayer - in multiplayer my experience shows the contrary.

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">you sure it works that way<span id='postcolor'>

Yes i am,

i've been using that in a mission, to let start randomly

choosen enemies to attack from randomly choosen

positions.

What i mean here is: as long as the mission is not running,

also that random variable creation isn't running for the clients.

So you can use the init.sqs for that.

I've been testing this stuff a long time;

When using a script (with no ?(local server)), the result was:

different random values on all machines.

When using init.sqs to create a random value, the result was:

equal random values on all machines.

And yes, i'm talking about multiplayer here.

~S~ CD

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (DV Chris Death @ Sep. 16 2002,19:58)</td></tr><tr><td id="QUOTE">i've been using that in a mission, to let start randomly

choosen enemies to attack from randomly choosen

positions.<span id='postcolor'>

Mhhh... I know someone who was really getting into problems with this - he wanted time and weather to be defined randomly for a mp mission. Didn't work for him (different weather and time for the different clients), but I don't know if he really used the init.sqs (i should think so, though).

If a unit is created it should always work: the ai unit is controlled by the server, which therefore also sends the position updates to all clients, so even if the random positions were different at the beginning they would be the same as soon as the server broadcasts the first position update - i.e. it would seem like they all had the same random position right from the start.

So maybe that's why it was working for you, but not for that friend of mine. Still, I'll pass that hint to him, maybe it helps.

Share this post


Link to post
Share on other sites

OK, i'll explain you first what i did:

I've been using the init.sqs to create some random values.

Then i was using a couple of gamelogics, and from their

wapyoints, i've set other variables, which activated the wp's of the enemies.

Now, there were let's say: 5 gamelogics, and each gl did activate the enemy attack in another way.

For example gl1 caused that enemy 1 started attack, followed

by enemy 3, then enemy 5, then 4 and then 2.

Gl2 did it in another way: 2,4,1,5,3, etc.

If you want to make it a bit more complex, it needs just some

switch triggers, being activated by variables, and those switch

triggers would let units appear on different wp's than other

switch triggers.

If you want more info here, i'll try to dig out this mission of

my custom-missions jungle and bring ya more detail with it.

~S~ CD

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  

×