Jump to content
Sign in to follow this  
dragon zen

How to show text on screen, without stop the player's control?

Recommended Posts

Hello friends:

I want to show some text on screen without stop player's control, just like another "hint", or something like process bar when you handle static weapons in ACE2. If I use DIALOG, player will stop their control and deal with the dialog. So I ask this question.

I know there is "bis_fnc_dynamictext", its effect is what I want. But this is not good enough, for it only show one message every time. I see the code of this function, but didn't understand it. Seems this kind of function is reached by DISPLAY, that is what I am not fimilar yet.

Thanks for you help!!

Share this post


Link to post
Share on other sites

Hello,

One I know of that can be set to repeatedly if you wish, is a code you can put into a trigger,

I dont recall if it works in static weapons or the like but i suppose its worth a try, put this code in the initilization field of a trigger:

hint "your message";

this hint or message will popup on the top right of the screen.

theres many ways to use it only ways I have used it is with triggers, not sure if it works for anything else.

hope that helps.

Share this post


Link to post
Share on other sites

Hi mate... I guess another one you can try is titleText.

titleText ["Show this text", "PLAIN"];

Share this post


Link to post
Share on other sites

ha, Of course I know the "hint", but I want to create another one....

title Text seems can't set at certain position and can't show muti message at time.

Can "bis_fnc_dynamictext" run serveral times at the same time? OK I'll try it again.

But my mission is based on AA2, I find it will report bug if I use bis_fnc_dynamictext. And if I some fnc_ew_credits(not exact), OA will report bug... So I want to do it myself.

Share this post


Link to post
Share on other sites

UPUP, anybody know how to create another "hint"??

Share this post


Link to post
Share on other sites
[url="http://community.bistudio.com/wiki/while"]while[/url] {alive player} do {
  hint "player is still alive";
  sleep 1;
};
hint "player is dead";

Share this post


Link to post
Share on other sites

You can use hint and taskHint at the same time?

If you use several taskHints at the same time they will show in sequence.

taskHint also has different colours.

http://community.bistudio.com/wiki/taskHint

eg:

taskhint ["New Task\nDrop off cargo at the\nnext waypoint.", [1, 1, 1, 1], "taskNew"];

colours:

[1, 1, 1, 1] = white

[0, 1, 0, 1] = green

[1, 0, 0, 1] = red

[1, .7, .4, 1] = orange

You can also get complex with hints and put pictures in them:

// Prepare variables.

private ["_pname","_picture","_color"];

// Customize hint colors.
_color = "#FFCC33";
_pname = name player;

// Grab image of players primary weapon. 
_picture = getText (configFile >> "cfgWeapons" >> primaryWeapon player >> "picture");

hint parseText format["
Pilot Officer <br/> <t size='1.0' color='#668CFF'>%1</t> <br/>
Welcome to Advanced Rotary Training.<br/>
Your instructor is waiting.<br/>
Get in a Helicopter!<br/>
<t color='%3'><img size='4' image='%2'/></t>",
_pname, _picture, _color
];

Another example:

// nul = [] execVM "scripts\AircraftHint.sqf";

// Prepare variables.

private ["_pname","_picture","_vname","_color"];

// Customize hint colors.

_color = "#668CFF";

_pname = name player;

// Grab friendly name and image of vehicle.

_vname = getText (configFile >> "cfgVehicles" >> typeof vehicle player >> "displayName");

_picture = getText (configFile >> "cfgVehicles" >> typeof vehicle player >> "picture");

hintSilent parseText format["

Pilot Officer <t color='%4'>%1</t> <br/>

Welcome to the <t color='#FFCC33'>%2</t> Advanced Training Exercise!<br/>

<t color='%4'><img size='4' image='%3'/></t>",

_pname, _vname, _picture, _color];

[West,"HQ"] commandChat format ["%1 %2 Cleared for takeoff.", _pname,_vname];

player sidechat "Roger, cleared for takeoff";

I learned most of that from Kylania's website I think.

http://www.kylania.com/ex/?p=65

http://www.kylania.com/ex/?p=15

http://www.kylania.com/ex/?p=43

There is a mission with all that in here:

The original Ass&Trash requires Arma2, Arma2:OA

http://www.mediafire.com/?6ok9f67bmfcao66

See here too:

http://forums.bistudio.com/showthread.php?p=1837528

http://forums.bistudio.com/showthread.php?t=115445

http://community.bistudio.com/wiki/parseText

Edited by PELHAM

Share this post


Link to post
Share on other sites

Here I showed someone how to make dialog/display hpp's in a fashion that makes them interchangeable easily. If you teach yourself to do dialogs this way rather than using idd's and findDisplay (uses onLoad command instead to set a variable which is obtained).

For your application though, it's the display method you're looking for, using cutRsc (preserves user control), rather than createDialog (removes user control). Seeing you have already tried normal dialogs, I'm assuming you already understand the "hpp language" and how to include it.

Also, in Domino (based on Domination), I made a typewriter script that replaces the default Domination welcome message, fully supports multiple lines (8 or 10 I believe, before carriage return). You can rip it to pieces and edit as you see fit of course, probably removing the actual typing :)

Edited by CarlGustaffa

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  

×