Jump to content
zagor64bz

How to place INTELS about randomly placed target?

Recommended Posts

I all..

could not find anything by googling..

I want to make a mission ( COOP/SP)where the target(HVT) is randomly spawning. To be able to locate him, you have to collect INTELS that will lead you to the HVT.

How do I do that? Is it VERY complicated?

Just to give you an example, like in the great SP campaign "Hunter six". There, you could also interrogate civis, to get info...not asking that much,just so you know.LOL.

Any idea?

Share this post


Link to post
Share on other sites

You can spawn a object (laptop, files or other) on the map, set a objective to get it (with/without marker). The item (intel) will have to have an addAction.

When the player will find the item, he will be able to click action. The addAction will execute file.

 

All is explained in details here :

 

Spawning it randomly in a certain area would require a little more.

  • Like 1

Share this post


Link to post
Share on other sites

You can spawn a object (laptop, files or other) on the map, set a objective to get it (with/without marker). The item (intel) will have to have an addAction.

When the player will find the item, he will be able to click action. The addAction will execute file.

 

All is explained in details here :

 

Spawning it randomly in a certain area would require a little more.

Thank you...

the problem is not to make them spawning  randomly, but because the "object" of the intel is the whereabouts of the HVT that WILL SPAWN RANDOMLY...

So, for istance, since in the INTERACTIVE INTELS that you can use in the editor you can put whatever info/pictures you want, if the location of the HVT change every time you restart the mission, the info inside the intels has to change also..

 

Hope I made myself clear....because I'm lost now..LOL

Share this post


Link to post
Share on other sites

Maybe make the intel's description random or cycle through on every start (don't think the latter is possible though ;)

I'll post something in a bit !

Share this post


Link to post
Share on other sites

In the file that's going to be executed by clicking you can put :

_array = ["first", "second", "third", "forth"];
_random = selectRandom _array; // randomly takes one of the variations

// defines what happens for each variation

if (_random == "first")
  then {hint "this is the first variation"};

if (_random == "second")
  then {hint "this is the second variation"};

if (_random == "third")
then {hint "this is the third variation"};

if (_random == "forth")
then {hint "this is the forth variation"};

Here there are four variations of the intel. You can create more, as you wish.

 

The code should be working, but it's not tested...

  • Like 1

Share this post


Link to post
Share on other sites

In the file that's going to be executed by clicking you can put :

_array = ["first", "second", "third", "forth"];
_random = selectRandom _array; // randomly takes one of the variation

// defines what happens for each variation

if (_random == "first")
  then {hint "this is the first variation"};

if (_random == "second")
  then {hint "this is the second variation"};

if (_random == "third")
then {hint "this is the third variation"};

if (_random == "forth")
then {hint "this is the forth variation"};

Here there are four variations of the intel. You can create more, as you wish.

 

The code should be working, but it's not tested...

Hey mate, thank you a lot!! I'll test it and get back to you asap.

Share this post


Link to post
Share on other sites

Another whay whith switchdo

_array = ["first", "second", "third", "forth"];
_random = selectRandom _array; // randomly takes one of the variations

// defines what happens for each variation

switch true do {
  case (_random == "first"): hint "this is the first variation";
  case (_random == "second"): hint "this is the second variation";
  case (_random == "third"): hint "this is the third variation";
  case (_random == "forth"): hint "this is the forth variation";
};

Maybe there are other ways to do it -_-

Share this post


Link to post
Share on other sites

Be aware that selectRandom is not yet available on the stable version.

Share this post


Link to post
Share on other sites

Be aware that selectRandom is not yet available on the stable version.

 

I thing this will work :

_array = ["first", "second", "third", "forth"];
_random = _array select floor random count _array; // randomly takes one of the variations

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

×