Home   Help Search Login Register  

Author Topic: Needed some answers for scripting  (Read 3997 times)

0 Members and 1 Guest are viewing this topic.

Offline X75TIGER75X

  • Members
  • *
Needed some answers for scripting
« on: 24 Dec 2008, 15:37:39 »
Hi,
I'm making fun zombie mission. I'm considering release it on web but its still not finished. Now I'm struggling on looking tutorials for advanced camscripting, Intro-Outro, and effects. I'm frustrated because I can't find a right and easy to understand tutorials with lot of great example. I can't find them in Mr.Murray's Arma Editing Guide. I can't find good one on internet. Most of them is too basic and didn't exactly answer my questions.

So here's my list of questions. I'll try make questions very clear enough for if people need know this information, they'll find it through google or OFPEC search.

1. How do you add ANN TV overlay in Arma? (SOLVED)

2. How do you remove fading to start when you start the mission? (If you start mission, game will pause controls, scripting, etc until black is faded away.) (If you still don't understand, take a look at my example mission down here) (SOLVED)

3. How change time of day in the script? (SOLVED)

4. How create an area that protects side from another side (Like Blufor in Blufor's safe area, Zombies or other side cannot enter or attack.)(SOLVED)

5. How do you put picture on screen during the game?(SOLVED)

UPDATE - 6. How do you hide markers in script?(SOLVED)

UPDATE - 7. Is there possible to make the game look grayish?(SOLVED)

UPDATE1 - 8. How can you enable GPS on soldier or civilians so they can use it?

UPDATE2 - 9. How do make trigger that only activated when units goes above specific height? ( like going up second floor in the building.)(SOLVED)
« Last Edit: 28 Dec 2008, 18:31:52 by X75TIGER75X »

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Needed some answers for scripting
« Reply #1 on: 24 Dec 2008, 19:01:49 »
1 - Using titleRsc or cutRsc with the corresponding name of the TV resource. You can create your own TV picture as well. Create a targa image setting as alpha chanel what is inside of the TV frame. Then use BIS TexView2 to convert it to paa, and then define it into your description.ext file as a title.

2 - The question is not clear for me.

3 - You can use skipTime or setDate commands.

4 - You may use triggers detecting the presence of the undesired side. If an undesired unit is detected inside, you can use setPos to change its position to somewhere else.

5 - Same as case 1, description.ext with a title class definition.
Code: [Select]
// description.ext
#define CT_STATIC          0

#define ST_LEFT            0
#define ST_CENTER          2
#define ST_SHADOW        256
#define ST_PICTURE        48


class RscText
{
        type = CT_STATIC;
        idc = -1;
        style = ST_LEFT;
        h = 0.04;
        colorBackground[] = {0, 0, 0, 0};
        colorText[] = {1, 1, 1, 1};
        font = "Bitstream";
        sizeEx = 0.02;
};

class RscPicture
{
        type = CT_STATIC;
        idc = -1;
        style = ST_PICTURE;
        colorBackground[] = {0, 0, 0, 0};
        colorText[] = {1, 1, 1, 1};
        font = "Bitstream";
        sizeEx = 0.04;
};

class RscTitles
{
   class ofpec
   {
      idd=-1;
      movingEnable=true;
      style = ST_CENTER + ST_PICTURE;
      duration=14;
      name="ofpec";
      controls[]={"ofpec"};

      class ofpec : RscPicture
      {
         idc = 801;
         x = 0.5;
         y = 0.5;
         w = 0.25;
         h = 0.25;
         sizeEx = 0.04;
  text = "ofpec.jpg";
      };
   };
};

Then, in to show ofpec.jpg:
Code: [Select]
titleRsc["ofpec", "PLAIN"];

Offline X75TIGER75X

  • Members
  • *
Re: Needed some answers for scripting
« Reply #2 on: 24 Dec 2008, 19:14:04 »
Mando, please take a look at example mission if you don't understand question 2. You'll see there was short pause in fading then camscript starts. I want to remove that

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Needed some answers for scripting
« Reply #3 on: 24 Dec 2008, 22:48:10 »
Try with
Code: [Select]
titleText["", "BLACK FADED"];
as very first command in your init.sqs or init.sqf. You will have an immediate blackscreen, then you setup your camera, etc

Offline X75TIGER75X

  • Members
  • *
Re: Needed some answers for scripting
« Reply #4 on: 25 Dec 2008, 17:00:32 »
It works on Mission really well, Thanks
but what about Intro, Its not working on intro. What script I need put code in?

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Needed some answers for scripting
« Reply #5 on: 25 Dec 2008, 17:47:36 »
initIntro.sqf instead of init.sqf

Offline X75TIGER75X

  • Members
  • *
Re: Needed some answers for scripting
« Reply #6 on: 25 Dec 2008, 17:51:10 »
Ok thanks Mando. so let me guess if i want do that in outro, so its initoutro1.sqf?

EDIT: I have some new questions for everybody to answer.
« Last Edit: 25 Dec 2008, 19:02:59 by X75TIGER75X »

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Needed some answers for scripting
« Reply #7 on: 25 Dec 2008, 19:44:14 »
6 - "markername" setMarkerTypeLocal "Empty"
7 - setAperture 0.065  (use setAperture -1 to set it to auto again).
8 - showGPS true

Offline X75TIGER75X

  • Members
  • *
Re: Needed some answers for scripting
« Reply #8 on: 26 Dec 2008, 21:21:02 »
6 - "markername" setMarkerTypeLocal "Empty"

How you turn them back on?

P.S. I added new questions.

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Needed some answers for scripting
« Reply #9 on: 27 Dec 2008, 01:54:17 »
"markername" setMarkerTypeLocal "ItsOriginalType"

Offline X75TIGER75X

  • Members
  • *
Re: Needed some answers for scripting
« Reply #10 on: 27 Dec 2008, 04:19:45 »
thanks Mandoble for your wonderful help, but don't forget my newest question, I need it most.

Offline hoz

  • OFPEC Site
  • Administrator
  • *****
Re: Needed some answers for scripting
« Reply #11 on: 27 Dec 2008, 04:51:53 »
Try

Code: [Select]
"markername" setMarkerTypeLocal "dot"
Or any of the others here
Xbox Rocks

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Needed some answers for scripting
« Reply #12 on: 27 Dec 2008, 05:13:28 »
Heights have little value inside buildings as all the heights there will be 0 no matter which floor you are, but you may place gamelogics in building indexed positions and then use the distance between a unit an a gamelogic to determine (more or less) if the unit is in the correct floor.

Offline X75TIGER75X

  • Members
  • *
Re: Needed some answers for scripting
« Reply #13 on: 27 Dec 2008, 16:30:20 »
I didnt understand what I should do with Gamelogic. I tried google it. I don't understand what Gamelogic does. Can you explain it for me and what I should do with it?

UPDATED- I found my building's indexed room, its postion 27, FactoryFloor2
« Last Edit: 28 Dec 2008, 04:21:03 by X75TIGER75X »

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Needed some answers for scripting
« Reply #14 on: 28 Dec 2008, 04:13:46 »
A gamelogic is a "invisible" unit of side logic without any AI, but you can setPos it as anyother unit, or create it with "logic" createVehicle position, etc.

When you place a unit just on a building in the map editor, you may set the building position (which in a script is returned by buildingPos command). So you can place gamelogics in the building that way, and then with a script or triggers checking the distance between the desired unit and these gamelogics.