Jump to content
fin_soldier

Credits Not As Intended

Recommended Posts

Hello,

 

I'm having some trouble with the ending credits for my psychological horror: Silent Abdera

 

The problem is that the credits only appear below cursor level, which looks weird if there's a bit longer text:

 

amiuoT1.jpg

 

valign='top' doesn't seem to work...

 

Here's the code:

cutText ["<t size='2.5' align='center' valign='top' shadow='2' font='EtelkaMonospaceProBold'>Thanks to:<br/><br/>All audio effects from:<br/>www.freesound.org<br/><br/>All creative commons pictures from:<br/>www.wikipedia.org<br/><br/>Internet Archive Book Images<br/>(www.flickr.com)</t>", "PLAIN", 3, true, true]; 0 cutFadeOut 2;

 

Thanks in advance! :)

Share this post


Link to post
Share on other sites

I think the problem is that valign only works in some containing box. You assume that cutText operate on the entire screen as that box, but I think it just creates the box with the top in the center and then the bottom whatever height your text have.

 

If you look at the example here at the bottom https://community.bistudio.com/wiki/Structured_Text#SQF_Code_Examples  you can see they wrap size=1 text inside size=3 to demonstrate - that way the "box" will be at least 3 units large. Though my guess is that you cannot do that since cutText will still place the "main box" center and below. So my bet is you will need to use  https://community.bistudio.com/wiki/cutRsc or some other command.

Share this post


Link to post
Share on other sites

Probably the best solution in this case is:

[" <t size='1.0' align='center' shadow='2' font='EtelkaMonospaceProBold'>
Thanks to:<br/><br/>
All audio effects from:<br/>www.freesound.org<br/><br/>
All creative commons pictures from:<br/>
www.wikipedia.org<br/><br/>
Internet Archive Book Images<br/>
(www.flickr.com)
</t>",safezoneX+0.25*safezoneW,safeZoneY+0.25*safezoneH, 5, 0.5, 0] spawn BIS_fnc_dynamicText;

 

Share this post


Link to post
Share on other sites

Thanks for a quick responses!

 

6 hours ago, dyrmoon said:

Probably the best solution in this case is:


[" <t size='1.0' align='center' shadow='2' font='EtelkaMonospaceProBold'>
Thanks to:<br/><br/>
All audio effects from:<br/>www.freesound.org<br/><br/>
All creative commons pictures from:<br/>
www.wikipedia.org<br/><br/>
Internet Archive Book Images<br/>
(www.flickr.com)
</t>",safezoneX+0.25*safezoneW,safeZoneY+0.25*safezoneH, 5, 0.5, 0] spawn BIS_fnc_dynamicText;

  

 

This seems like something simple that mind can grasp on easily.

But it says missing ] as seen below:

 

pOE2cZq.jpg

 

 

Share this post


Link to post
Share on other sites

I'm sorry, it's probably because I put the code in the html quote here on the forum, but try it now:

["<t size='1.0' align='center' shadow='2' font='EtelkaMonospaceProBold'> 
Thanks to:<br/><br/> 
All audio effects from:<br/>www.freesound.org<br/><br/> 
All creative commons pictures from:<br/> 
www.wikipedia.org<br/><br/> 
Internet Archive Book Images<br/> 
(www.flickr.com) 
</t>",safezoneX+0.25*safezoneW,safeZoneY+0.25*safezoneH,5,0.5,0] spawn BIS_fnc_dynamicText;

 

Another possible way to use the code:

_Info = "Thanks to:<br/><br/>
All audio effects from:<br/>www.freesound.org<br/><br/> 
All creative commons pictures from:<br/> 
www.wikipedia.org<br/><br/> 
Internet Archive Book Images<br/>
(www.flickr.com)";
_Duration = 5; //how long it should be displayed
_Fade = 0.5; //fade time

[format ["<t size='1.0' align='center' shadow='2' font='EtelkaMonospaceProBold'>%1</t>",_Info],safezoneX+0.25*safezoneW,safeZoneY+0.25*safezoneH,_Duration,_Fade,0] spawn BIS_fnc_dynamicText;

 

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

×