Jump to content
IceEagle132

[Tutorial] Intro Text

Recommended Posts

Hello, 

Here is a tutorial on how to add intro text to your server.

Location of changes: Mission.Map (Eg. AltisLife.Altis or TanoaLife.Tanoa)

Difficulty: Easy

Publish: HellsGate

Notes: In this tutorial, root refers Mission.Map 

_____________________________________________________________________________________________________________________________________

1. Navigate to your core folder and create a folder called intro, then create a file called fn_introtext.sqf and paste inside the following:

/*
	File: fn_introtext.sqf
	Description: Adds some text as the player loads in.
*/

_onScreenTime = 5;

sleep 2; //Wait in seconds before the credits start after player is in-game

_role1 = "Welcome to Altis Life";
_role1names = ["A Framework by Tonic"];
_role2 = "Improved upon";
_role2names = ["By The ArmA RPG Life Team"];
_role3 = "Visit Our Website at";
_role3names = ["www.yourwebsite.com"];
_role4 = "Join Our Teamspeak at";
_role4names = ["ts.yourwebsite.com"];
_role5 = "Please enjoy your stay";
_role5names = [profileName];
{
sleep 2;
_memberFunction = _x select 0;
_memberNames = _x select 1;
_finalText = format ["<t size='0.55' color='#c500ff' align='right'>%1<br /></t>", _memberFunction];
_finalText = _finalText + "<t size='0.70' color='#ffffff' align='right'>";
{_finalText = _finalText + format ["%1<br />", _x]} forEach _memberNames;
_finalText = _finalText + "</t>";
_onScreenTime + (((count _memberNames) - 1) * 0.9);
[
_finalText,
[safezoneX + safezoneW - 0.8,0.50], //DEFAULT: 0.5,0.35
[safezoneY + safezoneH - 0.8,0.7], //DEFAULT: 0.8,0.7
_onScreenTime,
0.5
] spawn BIS_fnc_dynamicText;
sleep (_onScreenTime);
} forEach [
//The list below should have exactly the same amount of roles as the list above
[_role1, _role1names],
[_role2, _role2names],
[_role3, _role3names],
[_role4, _role4names],
[_role5, _role5names]
];

2. Go back to your root directory and enter the dialog folder then the function folder. Once in the function folder, open fn_spawnConfirm.sqf and at the bottom underneath 

[] call life_fnc_welcomeNotification;

2.5. Add the following:

[] execVM "core\intro\fn_introtext.sqf ";

It should now look like this:

if (life_firstSpawn) then {
    life_firstSpawn = false;
    [] call life_fnc_welcomeNotification;
    [] execVM "core\intro\fn_introtext.sqf"; 
};

 

  • Like 6

Share this post


Link to post
Share on other sites

Corrections Here,

2.5. Add the following:

[] execVM "core\Intro\fn_Introtext.sqf";

     [] execVM "core\intro\fn_introtext.sqf ";

It should now look like this:

if (life_firstSpawn) then {
    life_firstSpawn = false;
    [] call life_fnc_welcomeNotification;
    [] execVM "core\Intro\fn_Introtext.sqf";
};

            [] execVM "core\intro\fn_introtext.sqf ";

  • Like 1

Share this post


Link to post
Share on other sites

For some reason this didn't work when I tried on my 4.4r3 server, so here is a simple solution if anyone can't get it working.

add this to your init.sqf in your root directory instead of your fn_spawnConfirm.sqf:

[] execVM "core\intro\fn_introtext.sqf";

 

 

  • Like 1

Share this post


Link to post
Share on other sites
On 9/19/2016 at 0:00 PM, Liam said:

For some reason this didn't work when I tried on my 4.4r3 server, so here is a simple solution if anyone can't get it working.

add this to your init.sqf in your root directory instead of your fn_spawnConfirm.sqf:

[] execVM "core\intro\fn_introtext.sqf";

 

 

What is the theory behind why calling the function in the fn_spawnConfirm.sqf doesn't work? Just wondering for learning purposes.

Share this post


Link to post
Share on other sites

You have wrote 2 errors.

1. U said to write -> introtext.sqf | [] execVM "core\intro\fn_introtext.sqf";  U forgot to add " fn_ "

2. In the R4 u have to put it before the end };

 

[...]
	};
    titleText[format["%2 %1",life_spawn_point select 1,localize "STR_Spawn_Spawned"],"BLACK IN"];
	[] call life_fnc_welcomeNotification;  
	[] execVM "core\intro\fn_introtext.sqf";
};
Edited by BOT.exe
  • Like 1

Share this post


Link to post
Share on other sites
1 hour ago, Bracer50 said:

This didn't work.... Instead it's making me reinstall my whole server... Even with a backup.

Did u follow what i said?

 

You have wrote 2 errors.

1. U said to write -> introtext.sqf | [] execVM "core\intro\fn_introtext.sqf";  U forgot to add " fn_ "

2. In the R4 u have to put it before the end };

 

[...]
	};
    titleText[format["%2 %1",life_spawn_point select 1,localize "STR_Spawn_Spawned"],"BLACK IN"];
	[] call life_fnc_welcomeNotification;  
	[] execVM "core\intro\fn_introtext.sqf";
};

Share this post


Link to post
Share on other sites

 

On 5/26/2017 at 2:01 PM, RazorzBlvck | kickback.com said:

 

When I come to the game fn_introtext.sqf not found has everything inserted

It's because the file in core\intro is named introtext.sqf, just rename it to fn_introtext.sqf then it should work fine

Share this post


Link to post
Share on other sites
27 minutes ago, uptoinsanity said:

i did everything said in the tut but i get this : Script core\intro\fn_introtext.sqf  not found

Ye it says whats wrong?

Share this post


Link to post
Share on other sites
5 minutes ago, uptoinsanity said:

Well when i join the game once i press spawn it says Script core\intro\fn_introtext.sqf how do i fix that?

It literally says "not found"? Thats the problem? and if you don't know how to fix it you probably shouldn't have a server.

Share this post


Link to post
Share on other sites
2 minutes ago, uptoinsanity said:

yea will i am new to this and if u would tell me what the problem is i wont ask again if something like that pops up

"not found" means that it doesn't find the script? Which means that you haven't placed the script inside core/intro

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×