Jump to content
Sign in to follow this  
NaveReyem

Adding Pictures to youre missions

Recommended Posts

Alright guys, this would be me first post on here, but im not a newb. anyways. Ive never figured out how to put .paas or jpgs into the missions i make.... i could use some help smile_o.gif

Share this post


Link to post
Share on other sites

With pictures you use html to get them into your briefings. With the overview you'll usually (if it's done right), have a chunk of text you can copy and paste straight into the briefing. Here is the bit you need.

<p align="center"><img src="PictureName.jpg" width="200" height="90"></p>

The image can be any size really but I usually keep to this specification, 512x256.

You can place the block of text anywhere in the briefing. You'll probably need to experiment with placement before you get it how you want it. Using <br> commands is a good idea so that your text isn't bunched up with your pictures.

Share this post


Link to post
Share on other sites

nono, i know how to do that, i mean make the pictures show up on a camera script.

Share this post


Link to post
Share on other sites

That's much more advanced work /w description.ext and resources.. not easy work to delve into, but I would best try to just open up another mission that already does this kind of work, look at the description.ext coding and see what and why it does the things it does. Thats the best way to learn it in my opinion wink_o.gif

Share this post


Link to post
Share on other sites

I did, ive tried and it had a bunch to do with RST stuff and things and a lot, but i copied the only thing i could see to do with a picture and it crashed my OFP

Share this post


Link to post
Share on other sites

It's not that hard. Okay, firstly check that picture's size is 2^n, for example 512x512 or 256x256. When you have that picture, you can go on.

Second we add needed lines to Description.ext:

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

class RscTitles

{

titles[]={YOURTITLE1,};

class YOURTITLE1

{

idd=-1;

movingEnable=0;

duration=2;

fadein=2;

fadeout=2;

name="YOURTITLE1";

controls[]={"Pic"};

class Pic : RscStdText

{

style=48;

text="your_picture.jpg";

x=0.46;

y=0.45;

w=0.08;

h=0.110;

};

};

};

Then add to Camerascene script this line:

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

TitleRsc ["YOURTITLE1","pLAIN",0]

And that should be it. Tell me if there's errors... huh.gif

Share this post


Link to post
Share on other sites

This is what i've putted in the description file of Operation Weasel to make appear an image in the intro

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

#define ST_PICTURE 48

#define CT_STATIC 0

//******************************************************************

// MISSION PICTURE

//******************************************************************

class RscGraphic

{

type = CT_STATIC;

idc=-1;

style = ST_PICTURE;

colorBackground[] = {0, 0, 0, 0};

colorText[] = {1, 1, 1, 1};

font = FontHtml;

size = 1;

};

class RscTitles

{

class Weasel

{

name = "weasel";duration = 5;

idd = -1;movingEnable = false;controls[]= {animal};

class animal : RscGraphic

{

text = "weasel.jpg";

x = 0.17;

y = 0.17;

w = 0.65;

h = 0.65;

};

};

To call for it:

cutrsc ["weasel", "plain", 0]

Klavan

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  

×