OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting Resources Beta Testing & Submission => Topic started by: Surdus Priest on 02 Jan 2008, 01:19:22

Title: Letter by Letter Hints (ACCEPTED)
Post by: Surdus Priest on 02 Jan 2008, 01:19:22
if you want hints to appear letter by letter then instead of:

hint "message here, blah blah blah"

use this:

call {["message here, blah blah blah"]execVM "Surdus_LbyL.sqf"};

a reminder is that it only works with arma 1.09beta because it uses toArray and toString, so it will be useful when the full version is out.  This is more or less a completed version since theres no bugs. however if a parameter for letter appearance delay is desired then thats no prob, but its at 0.06 now and that seems fine.

OFPEC DOWNLOAD (http://www.ofpec.com/ed_depot/index.php?action=details&id=629)
Title: Re: Letter by Letter Hints
Post by: LeeHunt on 02 Jan 2008, 20:39:04
alright i'll take a look  :D.  thanks for posting a resource  :good:
Title: Re: Letter by Letter Hints
Post by: Surdus Priest on 05 Jan 2008, 00:54:33
so do you like it?
Title: Re: Letter by Letter Hints
Post by: LeeHunt on 05 Jan 2008, 17:27:00
hi Surdus Priest,

Thanks for submitting this. I liked it and am going to incorporate it into my next mission as well.  I did not have a substantial log upon first loading up the mission even with loading Kronzy's string arrays.

For other mission makers, this resource creates a more telex type "James Bond" hint at the top corner that produces the letters one by one with a cool flash at the end of each message.  One of the extra touches that makes the game better  :D

We should have it uploaded soon...
Title: Re: Letter by Letter Hints
Post by: Surdus Priest on 05 Jan 2008, 18:20:47
im glad you like it :D

about like little flashes and such, i do have a version with slightly nicer effects, like a cursor which flashes a couple of times then types with the cursor in front of the text.  plus there was a typewriter sound i made with realistically random delays between each letter, but i stripped all that away to the bare bones so it can be altered as desired.

originally this needed kronzy's string scripts, and it looked different. but with the toString and toArray (from 1.09beta) there are no lag spikes, however i did need to fiddle around to switch from an array of ASCII numbers then back into letters.
Title: Re: Letter by Letter Hints
Post by: Mandoble on 05 Jan 2008, 20:08:52
Is this ready to be submitted already?
Title: Re: Letter by Letter Hints
Post by: Spooner on 06 Jan 2008, 12:06:47
Shouldn't this be a simple evolution of your older LetterByLetter script (that uses 1.08 "hack" string handling rather than 1.09 BIS string handling) rather than being a completely new script with considerably less functionality?
Title: Re: Letter by Letter Hints
Post by: Surdus Priest on 06 Jan 2008, 12:59:10
the functionality is the same, just less effects so users can modify it.

but yes it is an evolution so i should have posted it in the other thread.
Title: Re: Letter by Letter Hints
Post by: Spooner on 06 Jan 2008, 13:29:59
Well, it isn't entirely unreasonable to have started a new version, since this version requires ArmA 1.09 which is still only at beta stage, so lots of people will still be using 1.08. Still, I think people might like to see a fully-functional version for 1.09, since it is probably easier to remove the extra functions if not required, like sound, rather than add them yourself. Perhaps you could give users clear instructions on how to remove the sounds if they are not needed?

I'd also suggest that you should change this function so that you called it with the delay as a parameter, perhaps using a default value if the function is called without a second parameter, as well as giving clearer instructions on how to call the function:
Code: (calling from the editor) [Select]
nil = ["message here, blah blah blah", 0.05] execVM "Surdus_LbyL.sqf";

Code: (calling from a script) [Select]
Surdus_LbyL = compile preprocessFileLineNumbers "Surdus_LbyL.sqf";

["message here, blah blah blah"] spawn Surdus_LbyL; // Use default delay.
sleep 60;
["another message here, blah blah blah", 0.12] spawn Surdus_LbyL;
(admittedly, depending on the script that the script that the function was being called from, one might get away with using call, but spawn seems most likely to be appropriate).

Anyway, just suggestions. Incidentally, you might like to use forEach (or even for) rather than using while to iterate through an array, which seems a little clunky.