Barnaldo
-
Posts
10 -
Joined
-
Last visited
Content Type
Profiles
Forums
Articles
Posts posted by Barnaldo
-
-
Ok, here is exactly what I want to happen:
Player picks up an item(doesnt matter what)
If the player has this in their gear inventory they get a scroll option. (I can do this bit)
When they click the option, a message appears on screen and within the message is the code to a safe that is on the map. (I can display the message, just dont know how to have a certain safe's code to show in the message.)
-
Sorry, I should have been a bit more specific, I know how to display on screen text, what I need to know how to do, is use data from the database and display that in the text.
So for the example you have given, "_code" would be taken from a object_data in the database, for instance, I would want _code to be the value of CharacterID where ObjectID = 111.
Is this at all possible?
-
How could I display a message on screen with data from the database?
For example, if I wanted to display the code of a safe to a player, saying "The code is 1010" but taking the 1010 from the database.
-
I asked this earlier in the thread, but it seems to have been overlooked, so I shall ask again. :)
Is there a way for me to play custom sounds when the mission has been completed?
Can I upload ogg files to say WAI/sounds and play them from the mission files sqf?
Cheers.
-
Is there any way for me to play a custom sound when the mission has been completed?
-
you cant add sounds to a file that isn't sent to the clients, or they wont have the sound file to play. The reason the file is saved to the mission pbo/folder is so you can update the clients files with the sound...I assume you are trying to keep your mission file small, sadly your only options are to compress and optimize the oog that you use for the sound file. I have been able to take a 30 second file and compress it to about 80-100k. If you do manage to add the files to the server file by some miracle, the server start and will still grab them from the server.pbo and add them to the mission file you send to the client, other wise when the server/client tries to play the sound they will get an error to hear nothing.
Another option is to use the sound files built into arma, sadly there is no repository of all the files in arma2 and oa, and i dont knwo how to find them all and listen to them all.
Thanks for the info, thought that might be the case.
What did you use to compress the ogg files? I don't really need great quality audio for what I have planned, so compressing the files would be the next best route.
If I store them in the mission pbo, is it possible to call them to play from sqf files in the server pbo? I am trying to make some custom missions, that are in the server files, but I want to play sounds on completion of the mission etc, and since im using wickedAI as a template, I'd be using files in the server pbo.
-
Is there a way to put sound files into the server pbo and play them?
I know how to play them from the mission pbo, using cfgsoungs in the description.ext, then using playsound, but can i store the sound files inside the server pbo, and play them in an sqf from inside there that will play to all the players in the server?
Cheers.
-
As stated in my instructions you have to copy the file to you mission folder/pbo and change the reference in your init.sqf (just remove the path if you put it next to the init.sqf in the root folder)
Sorry I edited my previous post with a bit more info.
Yeah, I added it in the root mission folder with init.sqf etc... changed my init.sqf but it now won't load my server, if i remove the variables.sqf and change the init.sqf back to its original state, it loads fine.
Edit - Well, for whatever reason(probably just to make me look like a tool) it seems it now works.
Thanks for the amazing scripts mate.
-
Everythings working, except the elevator stops are deleting when built, I've added the object in my allowed objects in variables.sqf, but I think I'm putting the file in the wrong location.
If anyone could point me to exactly where the variables.sqf needs to go, that would be great.
I have tried in the following location(vilayer server):
vilayercustomcode/missions/epoch.chernarus
and i changed the call function to this:
call compile preprocessFileLineNumbers "variables.sqf";
doing this leaves my server continuously "creating"
Thanks.
Displaying data from the database as an on screen message
in Scripting
Posted
Yeah, I think I'll hardcode it in, I have some SQL knowledge, some C# and a little Arma scripting knowledge, but Im very much still learning.
Thanks for the help.