Jump to content

Recommended Posts

Hi all,
Been meddling for hours with this and it should be working simply but for some reason it JUST... IS ... NOT...

So been working at spawning an image on the screen instead of text, which is working fine via this;

 

if (hasInterface) then {

sleep 1;
"DynamicBlur" ppEffectEnable true;
"DynamicBlur" ppEffectAdjust[5];
"DynamicBlur" ppEffectCommit 3;
sleep 0.5;

["<img image='gui\codeLetter.paa' shadow='0' size='14' />",0.7,0,5,1,0,1000] spawn bis_fnc_dynamicText;

sleep 5;
"DynamicBlur" ppEffectEnable true;
"DynamicBlur" ppEffectAdjust[0];
"DynamicBlur" ppEffectCommit 3;
sleep 2;

};

Now it all works fine however the image shows up as a faded dark thingy... When I spawn a jpg it works fine but ofcourse due to the image it will show the white sides of the ripped paper, however I did convert it from a png to paa as Arma don't use png format.

Am I converting wrong I used the TexView 2 and tried the online PAA converter. which has worked for other things but not this... 

 

Screen Shot of What happens

Image of what should be on screen

Hope someone can help me, thanks all in advance...

RH

 

 

Edited by GODSPEEDSNAKE

Share this post


Link to post
Share on other sites

What size is the image? It has to be 2^x * 2^y, eg. 256x256, 1024x64 etc.

Edited by 7erra
power of two, not to the power of two

Share this post


Link to post
Share on other sites
42 minutes ago, 7erra said:

What size is the image? It has to be x^2 * y^2, eg. 256x256, 1024x64 etc.


Yeah 7erra, at first i didnt have that and worked, then I did it with the 2N in mind and did a png canvas 1024 x 1024 and still no go... I dont know if it is png converting to paa that is the issue though the reason im doing it is so its not a square image but I may have to just bite the bullet and do it like that... I know Arma engine only takes paa BUT does take jpg when coded like for the sample I did above but not png...

I'm just kind of hoping someone may have a work around...

Share this post


Link to post
Share on other sites

I edited my answer because I messed up on my math. Also, are you aware that Arma caches the paa? Any changes to the paa file are not reloaded. You have to rename your image everytime you change it or restart your game.

Share this post


Link to post
Share on other sites

Hi. As 7erra said the picture should be ideally 256x256, 1024x1024 , 2048x2048 etc... Did you converted the png in Textview2 as DXT5 ? DXT5 is format for transparent pictures. Also just like 7erra said, restarting the game or changing file name is necessary to see the changes.

Share this post


Link to post
Share on other sites

Yeah I did, played around with the paa rule of squared size! I did find the problem dont know why it is but for anyone struggling with the same or similar issue...

Up to 512x512 size works but not 1024x1024 and onwards... No idea why but yeah png can be converted to paa but if u want it on the ingame dont go larger than 512x512...

Screen Shot of working GUI

Testing some more but yeah she works as intended... Thanks guys for ur help though, only way to get through all these testing issues 🙂

  • Like 1

Share this post


Link to post
Share on other sites

@GODSPEEDSNAKE I got inspiration for creating a jumpscare in my "horror" mission using BIS_fnc_dynamicText, thanks!

May I ask why you made this function, instead of using BIS_fnc_initLeaflet ?
Or is the image meant to appear with a different interaction/trigger?

Eg: https://community.bistudio.com/wiki/File:a3_orange_leaflets_preview.jpg

Share this post


Link to post
Share on other sites

@GODSPEEDSNAKE That´s very strange. Just tested it with your original picture and it worked fine for me. So i tried to resize it to 2048x2048 and it also worked. Image size should not be an issue. If it converts correctly, then if you drag your converted image back into textview2, it should automaticly set it to RGBA/none/DXT5. If it won´t, i suggest to try different settings in software you´re using to create/edit your picture. In the end it should look like this . In case, you will not get it to work, i uploaded already converted image in your original size. You can download it here (stored for 30 days) . Let us know if that helped 🙂

Share this post


Link to post
Share on other sites

@soldierXXXX yeah bro no idea but since been working fine as long as I kept the aspect ratio so arms up in the air just going along with it... I do have another issue I can't wrap my head around... So I attach this to the object to activate the GUI over screen to "read the letter", and does work fine activates for everyone but I can't make it limited to u have to be within a certain distance from the item or object;

 

criticalNote = note1 addAction ["Read Critical Information...", {[[_this select 0], "scripts\mission\note\criticalNote.sqf"] remoteExec ["execVM", 0, true];}];


Now that works fine... Adds the action and executes it globally so all players of the unit can see it...

But I can't seem to add the;
 

"(_target distance _this) < 3"


into the equation for it to work as I have done here;

 

this addAction ["<t color='#00aeff'>ARSENAL</t>","scripts\arsenal.sqf", [false], 1, false, true, "", "(_target distance _this) < 3"];


Basically wish to be able to execute the addAction and have all player units see the letter but whom ever clicks the addAction must be say 1-2 meters from the item or object...

Know what I am doing wrong?

Share this post


Link to post
Share on other sites
On 10/16/2021 at 10:54 AM, Melody_Mike said:

@GODSPEEDSNAKE I got inspiration for creating a jumpscare in my "horror" mission using BIS_fnc_dynamicText, thanks!

May I ask why you made this function, instead of using BIS_fnc_initLeaflet ?
Or is the image meant to appear with a different interaction/trigger?

Eg: https://community.bistudio.com/wiki/File:a3_orange_leaflets_preview.jpg

 

@Melody_Mike With the campaign I'm working on I just kept the formation of letters, notes, radio conversation recordings, speech recordings and a bunch of other things so to keep all the coding and scripting relatively simple and easy to manage I just kept using the similar formats for file management...

Like the campaign has pre recorded voice and used some actors to speak what is scripted to immerse the players into the mission, then I have random letters, notes and bits of information all over the island giving clues and hints on where to go next, what to do and forward the investigation. Not to mention meeting random NPC's that have scripted conversations with the player units depending on whats asked... So kinda going all out with the immersive interaction  with forwarding the mission...

Share this post


Link to post
Share on other sites

You can solve it by using radius parameter. 🙂 

criticalNote = note1 addAction ["Read Critical Information...", {[[_this select 0], "scripts\mission\note\criticalNote.sqf"] remoteExec ["execVM", 0, true];},nil,1.5,true,true,"","true",3,false];

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

×