Jump to content

Recommended Posts

I know this has been discussed in other threads, actually I found one from almost 20 years ago, but following his instructions, it didn't work for me, so here's a novice editor asking a very basic question.
 

I would like to create an item (a briefcase) which the players must pick up and bring back to their base (where the game starts). Once I got the briefcase to that place, the mission is considered accomplished.
 

Someone could help me?

I just managed to create the item, pick it up and make it disappear from the game, but it gives me an error. Could someone help me please?

Share this post


Link to post
Share on other sites

Just to try and make things easier, that part you have already managed to make work, have you used triggers, right?

And how was your briefcase created? Did you use "createVehicle" with scripts, or is it an item placed in editor, which is already there since the beginning of the mission?
Did you give such a briefcase an entity name in editor, or does it have a command line like "_objCase = createVehicle..." in script?

Share this post


Link to post
Share on other sites
7 hours ago, JCataclisma said:

Just to try and make things easier, that part you have already managed to make work, have you used triggers, right?

And how was your briefcase created? Did you use "createVehicle" with scripts, or is it an item placed in editor, which is already there since the beginning of the mission?
Did you give such a briefcase an entity name in editor, or does it have a command line like "_objCase = createVehicle..." in script?

Thanks for your answer :)
 

I followed another thread and did the following:

1. I created an object, a briefcase.
2. I went to its attributes and named the object evi1.
3. In Init I wrote:
"this addaction ["Collect evidence!", "collect.sqf"];"
4. I created a file called collect.sqf inside the folder where I have my mission.
5. Copy this from the other thread:
"deletevehicle evi1;
tskEvidence1 setTaskState "SUCCEEDED";
[objNull, ObjNull, tskEvidence1, "SUCCEEDED"] execVM "CA\Modules\MP\data\scriptCommands\taskHint.sqf";"
 

My first question was "what is that about "execVM and the address where it points to?" Anyway, although the object can be picked up and disappears, it gives an error.
 

Then the thread added other instructions to play music, but I didn't test that.
 

In addition to all this, and that did not appear in the thread from almost 20 years ago that I found, I would like that when you pick up the briefcase, it would be taken to a point on the map and the mission was finished :)

Share this post


Link to post
Share on other sites
8 hours ago, TXTSpake said:

what is that about "execVM and the address where it points to?"

 

execVM compiles a script and adds it to the scheduler (the part of the game engine that decides what happens when.) The script it is calling in your example is one of Arma's default scripts. Unfortunately, it is one of Arma 2's default scripts, as the post you were looking at is from the A2 forums. In A3, I think BIS_fnc_showNotification is the way to go, which would change that line to:

["TaskSucceeded", ["Evidence secured!", 5]] call BIS_fnc_showNotification;

 

8 hours ago, TXTSpake said:

it gives an error

 

Aside from the above, there is a lot more info in that post that is required for it to work. For instance, you need to set up the task. tskEvidence1 doesn't exist in your example.

 

8 hours ago, TXTSpake said:

that did not appear in the thread from almost 20 years ago that I found

 

Arma 3 didn't exist 20 years ago, so you were probably looking at a post from ArmA Armed Assault (aka "Arma 1"). Many of the commands, functions, etc. we have now didn't exist back then. In fact, SQF itself didn't exist.

 

When spelunking for A3 info, make sure you are looking in the A3 forums (or at least an A3-relevant space.)

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

×