Jump to content
Sign in to follow this  
hellstorm77

Mission start text

Recommended Posts

im trying to make this a start text at the start of a mission i'm just having a little trouble converting it

start text

_targetStartText = format

[

"<t align='center' size='2.2'>Rescue Hostage</t><br/><t size='1.5' align='center'

color='#FFCF11'>%1</t><br/>____________________<br/>At 05:00 Zulu time Iranian force have taken the US Ambassador

as hostage and taken him to Air Station Mike 26. We need to rescue the Ambassador<br/><br/>Remember to take the

Ambassador back to base.",

_currentTarget

];

Share this post


Link to post
Share on other sites

i put this in the init.sqf. I saw it in another mission i have but when i try to do it the same way it doesn't seem to work when mission starts it doesn't show

_targetStartText = format
[

"<t align='center' size='2.2'>Rescue Hostage</t><br/><t size='1.5' align='center' 
color='#FFCF11'>%1</t><br/>____________________<br/>At 05:00 Zulu time Iranian force have taken the US Ambassador 

as hostage and taken him to Air Station Mike 26. We need to rescue the Ambassador<br/><br/>Remember to take the 

Ambassador back to base.",

_currentTarget
];

---------- Post added at 13:18 ---------- Previous post was at 12:59 ----------

i have even tried this in the init.sqf still no luck

hint parseText "<t align='center' size='2.2'>Rescue Hostage</t><br/><t size='1.5' align='center' 
color='#FFCF11'>%1</t><br/>____________________<br/>At 05:00 Zulu time Iranian force have taken the US Ambassador 

as hostage and taken him to Air Station Mike 26. We need to rescue the Ambassador<br/><br/>Remember to take the 
Ambassador back to base.",

Share this post


Link to post
Share on other sites

You added comma at the end instead of semicolon, here this works.

_currentTarget = player;
hint parseText format["<t align='center' size='2.2'>Rescue Hostage</t><br/><t size='1.5' align='center' 
color='#FFCF11'>%1</t><br/>____________________<br/>At 05:00 Zulu time Iranian force have taken the US Ambassador
as hostage and taken him to Air Station Mike 26. We need to rescue the Ambassador<br/><br/>Remember to take the 
Ambassador back to base.", name _currentTarget];

Also for debuging purposes you can run Arma with startup command -showScriptErrors

Or look into your C:\Users\YOU\AppData\Local\Arma 3 Alpha\arma3_DATE-TIME.rpt which is complete error log since last Arma start.

Share this post


Link to post
Share on other sites

its still not showing up at the start of the mission do i have to add a target marker? or add something else for it to come up?

Share this post


Link to post
Share on other sites

I put aeroson's code in a init.sqf in the mission folder and it worked for "the player" at the start of my mission.

Share this post


Link to post
Share on other sites

yeah it works now thanks im getting an error with this line red line does it look right?

[] spawn {

scriptName "initMission.hpp: mission start";

["rsc\FinalComp.ogv", false] spawn BIS_fnc_titlecard;

waitUntil {!(isNil "BIS_fnc_titlecard_finished")};

[[1864.000,5565.000,0],"US Ambassador has been taken hostage."] spawn BIS_fnc_establishingShot;

titleText [WELCOME_MESSAGE, "PLAIN", 3];

_null = [] execVM "pilotCheck.sqf";

};call compile preprocessFile "=BTC=_revive\=BTC=_revive_init.sqf";

call compile preprocessFile "=BTC=_TK_punishment\=BTC=_tk_init.sqf";

---------- Post added at 19:52 ---------- Previous post was at 19:03 ----------

I put aeroson's code in a init.sqf in the mission folder and it worked for "the player" at the start of my mission.

when i add =BTC=_revive to the mission the texted doesnt seem to come up for some reason

Share this post


Link to post
Share on other sites

};call compile preprocessFile "=BTC=_revive\=BTC=_revive_init.sqf";

I'm a novice at scripting but is the bolded }; at the beginning of the above line correct or needed?

Share this post


Link to post
Share on other sites

Or just use this in init.sqf, it will look like it did in Arma II, white text in the rightcorner:

//Info text
waitUntil{!(isNil "BIS_fnc_init")};
sleep 5;
["date, year", "time AM/PM"] call BIS_fnc_infoText;
sleep 2;
["Mission Name"] call BIS_fnc_infoText;
sleep 2;
["Created by", "XXX"] call BIS_fnc_infoText;

You can put what ever you want in there and change the sleep time accordingly. Just remember the lines are "limited" so if you have some longer text divided it into more lines using "X","X", like shown in the code.

Although this will produce a no_sound error popup, untill the funtions works properly, but it wont affect gameplay :)

Share this post


Link to post
Share on other sites

i changed it last night to and most of my problems went away

Edited by hellstorm77

Share this post


Link to post
Share on other sites

does this look right?

_currentTarget = player;

hint parseText format["<t align='center' size='2.2'>Rescue Hostage</t><br/><t size='1.5' align='center'

color='#FFCF11'>%1</t><br/>____________________<br/>At 05:00 Zulu time Iranian force have taken the US Ambassador

as hostage and taken him to Air Station Mike 26. We need to rescue the Ambassador<br/><br/>Remember to take the

Ambassador back to base.", name _currentTarget];

#define WELCOME_MESSAGE "Welcome to [dR]\n" +\

"By[dR]Hellstorm77 Special Thanks to Sparky & Xxshenaniganx for helping test this mission\n\n" +\

"Revive and Team Killing punishment added\n\n" +\

"Support us and have your say on the forum, please register at\n" +\

"www.dedicatedrejects.com\n\n" +\

"...and feel free to join us on TeamSpeak at\n" +\

"voice.dedicatedrejects.com"

// ==============================================

[] spawn {

scriptName "initMission.hpp: mission start";

["rsc\FinalComp.ogv", false] spawn BIS_fnc_titlecard;

waitUntil {!(isNil "BIS_fnc_titlecard_finished")};

[[1864.000,5565.000,0],"US Ambassador has been taken hostage."] spawn BIS_fnc_establishingShot;

titleText [WELCOME_MESSAGE, "PLAIN", 3];

};

Edited by hellstorm77

Share this post


Link to post
Share on other sites

say i place a trigger named "trigger2" how would i call up this

init.sqf

_currentTarget = player;
hint parseText format["<t align='center' size='2.2'>Operation Aries</t><br/><t size='1.5' align='center' 
color='#FFCF11'>%1</t><br/>____________________<br/>At 05:00 Zulu time Iranian force have taken the British Ambassador as hostage . We need to rescue the Ambassador<br/><br/>Remember to take the Ambassador back to base.", name _currentTarget];

Share this post


Link to post
Share on other sites

Ok ive learned alot today about this :)

Go in the editor and create a trigger, then go to "EFFECTS" and set "TYPE" to "TEXT" and set "EFFECT" to what ever you want.

Effect is basicly the way it will be showed on the screen.

Thats it oO, im surpriced aswell hehe.

But it works and it shows text on the screen, when you trigger the trigger so to speak.

So just place a trigger at the very beginning and use this and you have text at mission start :)

I just placed multible triggers with space between then to show what i wanted, while people are flown in via chopper in the start of my mission.

EDIT:

Ohh forgot to mention you should OFC add your own sentence to the bottom line in "EFFECTS" :)

Edited by Byrgesen

Share this post


Link to post
Share on other sites

how would the trigger know how to call this up

_currentTarget = player;

hint parseText format["<t align='center' size='2.2'>Operation Aries</t><br/><t size='1.5' align='center'

color='#FFCF11'>%1</t><br/>____________________<br/>At 05:00 Zulu time Iranian force have taken the British Ambassador as hostage . We need to rescue the Ambassador<br/><br/>Remember to take the Ambassador back to base.", name _currentTarget];

Share this post


Link to post
Share on other sites
how would the trigger know how to call this up

_currentTarget = player;

hint parseText format["<t align='center' size='2.2'>Operation Aries</t><br/><t size='1.5' align='center'

color='#FFCF11'>%1</t><br/>____________________<br/>At 05:00 Zulu time Iranian force have taken the British Ambassador as hostage . We need to rescue the Ambassador<br/><br/>Remember to take the Ambassador back to base.", name _currentTarget];

No clue really.

But why not take the

"At 05:00 Zulu time Iranian force have taken the British Ambassador as hostage . We need to rescue the Ambassador"

And stuff it in a trigger to show ingame text?

I am not sure how it works, with what you are trying to do, but my method seems easier tbh :)

And it sounds like its the same result.

You could always try downloading a wasteland mission and unpacking it, i know they have a text overlay at the start, although its quite ugly tbh.

Share this post


Link to post
Share on other sites

im getting an error with this any ideas?

[] spawn {

scriptName "initMission.hpp: mission start";

["rsc\FinalComp.ogv", false] spawn BIS_fnc_titlecard;

waitUntil {!(isNil "BIS_fnc_titlecard_finished")};

[[1864.000,5565.000,0],"US Ambassador has been taken hostage."] spawn BIS_fnc_establishingShot;

titleText [WELCOME_MESSAGE, "PLAIN", 3];

};

Error in expression <tage."] spawn BIS_fnc_establishingShot;

titleText [WELCOME_MESSAGE, "PLAIN", 3];>

Error position: <titleText [WELCOME_MESSAGE, "PLAIN", 3];>

Error Type Any, expected String

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  

×