Home   Help Search Login Register  

Author Topic: Briefing and NOT ALIVE  (Read 2527 times)

0 Members and 1 Guest are viewing this topic.

Offline Rytuklis

  • Members
  • *
Briefing and NOT ALIVE
« on: 31 Dec 2011, 21:31:15 »
So, i used A2B to create a briefing and saved it to my mission files as briefing.sqm
But it wouldnt work -_-
Code:
Code: [Select]

// Created in A2B Editor by EMSI
Nikolai_Ivanovich createDiaryRecord ["Diary", "Today we have been sent into Chernarus as a Peackeeper unit. I will have to lead Roman team into the assault. I'm a bit nervous though, this is my first time leading units into a real battle, and i really hope that nerviousity will not affect my quality."];

obj1 = Nikolai_Ivanovich createSimpleTask ["Take the beach"];

obj2 = Nikolai_Ivanovich createSimpleTask ["Take the capital"];

obj1 setSimpleTaskDescription ["In order to take the capital of Chernarus, we must take the beach.", "Primary Objective", ""];
// Team work is a key in this operation. Do not forget it Comrade!

Also, when i do this:

Code: [Select]
not (alive rebelt1) and; not (alive rebelt2) and; not (alive rebelt3) and; not (alive rebelt4) and; not (alive rebelt5) and; not (alive rebelt6) and; not (alive rebelt7) and; not (alive rebelt8) and; not (alive rebelt9) and; not (alive rebelt10) and; not (alive rebelt11) and; not (alive rebelt12) and; not (alive rebeltank)
in condition of the trigger, it says "Invalid variable number"

Offline savedbygrace

  • Intel Depot
  • Administrator
  • *****
  • Be swift to hear...slow to speak...slow to wrath.
Re: Briefing and NOT ALIVE
« Reply #1 on: 01 Jan 2012, 09:57:46 »
First of all, sqm is the file extension that defines everything you do in the mission editor, so refrain from using that extension.
The Briefing must be in sqf format, debriefing in the older html format. Looks like you have everything in order as far as code goes unless I missed something. Make sure that the variable that you are assigning the diary record to "Nikolai_Ivanovich", is the name of the player unit, or you will never see it. It can be the name of a playable unit, but again, you will not see until you are able to test it on a server. So to test it in the editor, the player must be the unit it is assigned to.

The code in your condition field is good to go except for the semicolons. Those are only required to separate commands in the OnActivation fields or init fields. Remove them and it will work fine.

A note on errors like that. When the error message prompts you of a mistake, the cursor will move immediately to the first error inside the field, which gives you a hint of what may be causing the problem.

Happy editing pal.

Offline Rytuklis

  • Members
  • *
Re: Briefing and NOT ALIVE
« Reply #2 on: 01 Jan 2012, 11:53:57 »
Thank you! Happy new year!

I noticed that the file is .sqf.. It still wouldn't work ;(
« Last Edit: 01 Jan 2012, 12:18:18 by Rytuklis »

Offline savedbygrace

  • Intel Depot
  • Administrator
  • *****
  • Be swift to hear...slow to speak...slow to wrath.
Re: Briefing and NOT ALIVE
« Reply #3 on: 01 Jan 2012, 17:36:32 »
Okay, after closer inspection of your code; you seem to be missing an array within an array.
What that means is when you create a diary record, it must be an array within the already established diary subject that you're assigning it to. Since you are attempting to assign a new diary record to the default diary subject labeled "Diary", You need to place that Diary record within it's own array. For example...
player createDiaryRecord ["Diary", ["Record Dialog", "Record Information"]];

And to reiterate, be sure that the player unit is named "Nikolai_Ivanovich", else you will not see the record.

Sorry about that slip up pal. Happy editing!

Offline SaOk

  • Missions Depot Staff
  • *****
    • My youtube profile
Re: Briefing and NOT ALIVE
« Reply #4 on: 01 Jan 2012, 21:26:59 »
Edit: I misread. Unneeded post.

Offline Rytuklis

  • Members
  • *
Re: Briefing and NOT ALIVE
« Reply #5 on: 02 Jan 2012, 19:32:49 »
Okay, after closer inspection of your code; you seem to be missing an array within an array.
What that means is when you create a diary record, it must be an array within the already established diary subject that you're assigning it to. Since you are attempting to assign a new diary record to the default diary subject labeled "Diary", You need to place that Diary record within it's own array. For example...
player createDiaryRecord ["Diary", ["Record Dialog", "Record Information"]];

And to reiterate, be sure that the player unit is named "Nikolai_Ivanovich", else you will not see the record.

Sorry about that slip up pal. Happy editing!


I do not understand.. Everything you said is in the briefing file ;(

EDIT: I have used a new program to create a breifing file, code is like this:

Code: [Select]
// A2BM E    110
// DO NOT EDIT THIS FILE

waitUntil {!(isNull Nikolai_Ivanovich)};
waitUntil {player==Nikolai_Ivanovich};
switch (side Nikolai_Ivanovich) do
{
case WEST:
{
};
case EAST:
{
Nikolai_Ivanovich createDiaryRecord ["Diary",["Be careful. Enemy positions are concealed ad hardly seen in the Elektrozavodsk",""]];
MAG_tskObj3=Nikolai_Ivanovich createSimpleTask ["Fight off enemy reinforcments"];
MAG_tskObj3 setSimpleTaskDescription ["Fight off the enemy reinforcments","Fight off enemy reinforcments","Fight off enemy reinforcments"];
MAG_tskObj2=Nikolai_Ivanovich createSimpleTask ["Destroy the enemy BMP"];
MAG_tskObj2 setSimpleTaskDescription ["Destroy the enemy BMP located inside the village","Destroy the enemy BMP","Destroy the enemy BMP"];
MAG_tskObj1=Nikolai_Ivanovich createSimpleTask ["Seize the Capital"];
MAG_tskObj1 setSimpleTaskDescription ["Seize the first part of the Elektrozavodsk","Seize the Capital","Seize the Capital"];
MAG_tskObj0=Nikolai_Ivanovich createSimpleTask ["Fight off the Coast Guard units of Red Fist"];
MAG_tskObj0 setSimpleTaskDescription ["Fight off all available enemy units near the Beach of Elektrozavodsk","Fight off the Coast Guard units of Red Fist","Fight off the Coast Guard units of Red Fist"];
player setCurrentTask MAG_tskObj0;
};
case RESISTANCE:
{
};
case CIVILIAN:
{
};
};

It doesnt work....
« Last Edit: 02 Jan 2012, 20:06:16 by Rytuklis »

Offline savedbygrace

  • Intel Depot
  • Administrator
  • *****
  • Be swift to hear...slow to speak...slow to wrath.
Re: Briefing and NOT ALIVE
« Reply #6 on: 02 Jan 2012, 22:00:07 »
The last example I gave you was copied from your first code example. I added brackets for the diary record which were emboldened in my previous post. Your new code has those brackets so the problem could be elsewhere. Attach your mission here so I can have a look.

You really do not need all of that extra code unless you're going to use it. Otherwise, just avoid using the Nikolai_Ivanovich variable and use player. If you insist on keeping that code, make sure the player unit is on the EAST side.

« Last Edit: 02 Jan 2012, 22:04:40 by savedbygrace »

Offline Rytuklis

  • Members
  • *
Re: Briefing and NOT ALIVE
« Reply #7 on: 03 Jan 2012, 09:48:32 »
Here you go, but bear in mind that you will have to manually skip the cutscene, it is not finished yet ;d

Offline Rytuklis

  • Members
  • *
Re: Briefing and NOT ALIVE
« Reply #8 on: 15 Jan 2012, 10:49:51 »
Emm, how do i make an overview?

Offline savedbygrace

  • Intel Depot
  • Administrator
  • *****
  • Be swift to hear...slow to speak...slow to wrath.
Re: Briefing and NOT ALIVE
« Reply #9 on: 15 Jan 2012, 23:54:38 »
Same as former titles. Nothing different there.

Same also for debriefing. HTML file with debriefing section.

Offline Rytuklis

  • Members
  • *
Re: Briefing and NOT ALIVE
« Reply #10 on: 25 Jan 2012, 18:23:12 »
Does Overviews/Debriefs made in Chris OFP Script editor suits ARMA II?