riouken
-
Content Count
570 -
Joined
-
Last visited
-
Medals
Posts posted by riouken
-
-
a simple idea but have you planed to add a sort of blood loss and quantity ? like dayZ i think it can be really cool and imersive if you see one of your mate just bleed out when he get shot anyway nice progress i really like that and give me alot of ideas !I agree it will need some type of blood loss sim, but I doubt it will be like dayZ, lol every hit is like cutting your juggler, with a geiser of blood spray.
I think it should be more like the ACE system.
-
Yes, the plan is to have your injury's be the base for your symptoms, you will then have evaluate those symptoms and then pick the right treatment.
We are also working on a triage system, I hope to have that up and going by this weekend, i'm working on the gui now. While I wait on the other rhythm's to be finished.
.
-
For example here is a button:
You have to have all of this defined to use a button.
class cms_RscButton { access = 0; type = 1; text = ""; colorText[] = {0.8784,0.8471,0.651,1}; colorDisabled[] = {0.4,0.4,0.4,1}; colorBackground[] = {1,0.537,0,0.5}; colorBackgroundDisabled[] = {0.95,0.95,0.95,1}; colorBackgroundActive[] = {1,0.537,0,1}; colorFocused[] = {1,0.537,0,1}; colorShadow[] = {0.023529,0,0.0313725,1}; colorBorder[] = {0.023529,0,0.0313725,1}; soundEnter[] = {"",0.09,1}; soundPush[] = {"",0.09,1}; soundClick[] = {"\ca\ui\data\sound\new1",0.07,1}; soundEscape[] = {"",0.09,1}; style = 2; x = 0; y = 0; w = 0.095589; h = 0.039216; shadow = 2; font = "Zeppelin32"; sizeEx = 0.03921; offsetX = 0.003; offsetY = 0.003; offsetPressedX = 0.002; offsetPressedY = 0.002; borderSize = 0; };
We can do that once and put it in a file and #include it in the description.ext.
Now we can use that button in our dialogs/displays.
class mynew_button : cms_RscButton // Here we are inheriting from what we defined above so all we have to do below is put in a ID and the position of the button and any text we want it to say. { idc = 1600; text = "My new Button"; x = 0.729102 * safezoneW + safezoneX; y = 0.2875 * safezoneH + safezoneY; w = 0.0502084 * safezoneW; h = 0.0303703 * safezoneH; };
-
I think .sqf would be harder to debug if it was strongly typed.
Now if there is a problem it compiles the .sqf anyways and you get the error when you call the code.
If it was strongly typed it would have to stop compiling and would likey result in ctd. Just like now if there is a problem in an addon or in the description.ext , it would be a pita to have to restart for each error.
Its not like c# or c++ where we compile before we run the code.
-
Just because you "can" doesn't mean you "should".
It can and will lead to timing issues esp. In MP and jip.
-
Its not a good idea to put a pause or(waitUntil) in your init.
I would put it in a .sqf and then execVM that .sqf from the init.
-
Yes if it is a really simple dialog then it can be all defined in the description.ext of the mission or in the config.cpp of an addon. Dialog's are some of the more difficult things to code in Arma. Its not a simple yes or no, firstly dialog's don't go in .sqf files they go in .hpp files, or included in the file types as I stated above.
Second unless it is an extremely simple dialog it is going to get messing fast putting it all into the description.ext or config.cpp and is generally considered bad practice. The preferred way is to separate the dialog from its base classes and put them in their own .hpp files and then using #preprocssor commands include them in the description.ext or config.cpp.
With dialog's it is very important to use inheritance to help reduce the amount of code you have to write or define for each "dialog". That's why its recommended to separate the base definitions and setups and then just define your dialog and any small changes that it needs, it can inherit the rest from the base classes, that way you do not have to write them over and over for each dialog.
-
It is not as simple as yes or no.
Here is how they are created: http://community.bistudio.com/wiki/Dialog_Control
-
Not exactly.
Lets say you want a plane to move to the aircraft carier and be next to the genarator.
_plane = _this select 0; // First we refrence the generator and then we provide the offset [-5,0,0] // That offset will put it 5m beside the generator. _worldPos = generator modelToWorld [-5,0,0]; // Now we need to get the plane there. _plane setPos [_worldPos select 0, _worldPos select 1, 0];
This is just another way to teleport something, it is usually used to teleport something to a pos offset from an object. but since we create the world pos in model space instead of just a regular getpos or provideing coords, the object retains its original dir. its normaly considered a side effect or something to work around when using this command.
But as I said before I think you were having a timing issue and that's why doing the setdir before you teleported is working, this has the same effect.
-
-
Its used like this, this is a teleport script for a player from a flag but you get the idea. Basically the way it works is instead moveing an object to a pos, it creates the world around the object relative to some other place.
// Who are we teleporting _caller = _this select 1; // Move them 5m behind the flag. _worldPos = tele_flag modelToWorld [0,-5,0]; _caller setPos [_worldPos select 0, _worldPos select 1, 0];
-
no good, 'model' returns nothing, "icon" returns the path shown here, but that's just an icon path....arrrg. Wish there was an easy way to just extract the sound and I'll throw it in my mission folder.Have you tried this:
AirAlarmSfx
That is listed in in the link, if it is already in configsound then you can just use it with the cba command.
-
It should have a defalt location or path like (Im just making this up but it will look like this) ca\extra\sounds\general\Sound_Alarm2.ogg // or something like that.
---------- Post added at 06:56 PM ---------- Previous post was at 06:43 PM ----------
This is UNTESTED but I think this will get the path for you, you can give it a shot.
// Run in game to get the path for "Sound_Alarm2" will hint and copy it to clipboard. _path = getText(configFile >> "cfgVehicles" >> "Sound_Alarm2" >> "model"); hint _path; copyToClipboard _path;
-
I think what he was talking about was the fact that your checking if it IS a (dedicated server) OR if the (player is not null).
That will always be true, because if it is on a dedicated server then the first condition will be true, if its on a client or self hosted then the second will be true.
I think what you meant to put was this:
[left][color=#0000BB][font=monospace][i]waitUntil [/i][/font][/color][color=#007700][font=monospace][i]{[/i][/font][/color][i]![/i][color=#0000BB][font=monospace][i]isDedicated [/i][/font][/color][color=#007700][font=monospace][i]&& ![/i][/font][/color][color=#0000BB][font=monospace][i]isNull player[/i][/font][/color][color=#007700][font=monospace][i]};[/i][/font][/color][/left]
I added a (!) in front of (isDedicated) and changed from or to AND.
The reason I say this is that you are using the player command later on in that script and that should never be run on the server, it will always be false, and cause errors.
[left][color=#0000BB][font=monospace]waitUntil [/font][/color][color=#007700][font=monospace]{[/font][/color][color=#0000BB][font=monospace]isDedicated [/font][/color][color=#007700][font=monospace]|| ![/font][/color][color=#0000BB][font=monospace]isNull player[/font][/color][color=#007700][font=monospace]}; [/font][/color][color=#DD0000][font=monospace]"iDied" [/font][/color][color=#0000BB][font=monospace]addPublicVariableEventHandler [/font][/color][color=#007700][font=monospace]{ [/font][/color][color=#0000BB][font=monospace]_pv [/font][/color][color=#007700][font=monospace]= [/font][/color][color=#0000BB][font=monospace]_this select 1[/font][/color][color=#007700][font=monospace]; [/font][/color][color=#0000BB][font=monospace]_who [/font][/color][color=#007700][font=monospace]= [/font][/color][color=#0000BB][font=monospace]_pv select 0[/font][/color][color=#007700][font=monospace]; [/font][/color][color=#0000BB][font=monospace]_whereTo [/font][/color][color=#007700][font=monospace]= [/font][/color][color=#0000BB][font=monospace]_pv select 1[/font][/color][color=#007700][font=monospace]; if (![/font][/color][color=#0000BB][font=monospace]local _whereTo[/font][/color][color=#007700][font=monospace]) [/font][/color][color=#0000BB][font=monospace]exitWith [/font][/color][color=#007700][font=monospace]{}; [/font][/color][color=#0000BB][font=monospace]_who assignAsCargo _whereTo[/font][/color][color=#007700][font=monospace]; [/font][/color][color=#0000BB][font=monospace]_who moveInCargo _whereto[/font][/color][color=#007700][font=monospace]; }; [/font][/color][/left] [color=#ff0000] [left][font=monospace]player [/font][color=#0000BB][font=monospace]addEventHandler [/font][/color][color=#007700][font=monospace][[/font][/color][color=#DD0000][font=monospace]"Respawn"[/font][/color][color=#007700][font=monospace],[/font][/color][/left] [/color] [left][color=#007700][font=monospace] { [/font][/color][color=#0000BB][font=monospace]waitUntil [/font][/color][color=#007700][font=monospace]{[/font][/color][color=#0000BB][font=monospace]alive player[/font][/color][color=#007700][font=monospace]}; if ([/font][/color][color=#0000BB][font=monospace]local ambulance[/font][/color][color=#007700][font=monospace]) [/font][/color][color=#0000BB][font=monospace]then[/font][/color][color=#007700][font=monospace]{ [/font][/color][color=#0000BB][font=monospace]player assignAsCargo ambulance[/font][/color][color=#007700][font=monospace]; [/font][/color][color=#0000BB][font=monospace]player moveInCargo ambulance[/font][/color][color=#007700][font=monospace]; }else{ [/font][/color][color=#0000BB][font=monospace]iDied[/font][/color][color=#007700][font=monospace]= [[/font][/color][color=#0000BB][font=monospace]player[/font][/color][color=#007700][font=monospace],[/font][/color][color=#0000BB][font=monospace]ambulance[/font][/color][color=#007700][font=monospace]]; [/font][/color][color=#0000BB][font=monospace]publicVariable [/font][/color][color=#DD0000][font=monospace]"iDied"[/font][/color][color=#007700][font=monospace]; }; } ]; [/font][/color][/left]
... what?Try this in your init.sqf
sleep 1; hint "before wait"; waitUntil {false}; hint "after wait!";
The second hint never shows up. waitUntil suspends the script until whatever the condition is becomes true. In this case, never, since false can never be true.
-
Yes you can add it to your mission as a custom sound:
http://community.bistudio.com/wiki/Description.ext#cfgSounds
Tutorial:
http://ofp.toadlife.net/downloads/tutorials/tutorial_sound/tutorial_sound.html
Although I doubt you would have to go to that depth, just define it as a custom sound in your description.ext and point to it in CfgVehicles. since it should be on everyone's comptuer already.
But maybe some sound experts will come along and give some better/more advice. Like I said I dont mess with sounds to much.
-
I don't use this too much but I am pretty sure you need an object for the sound and not a marker. http://community.bistudio.com/wiki/Object . You need some type of object to "Say" the sound or for the sound to emanate from. You could probably even use an invisible object if you wanted.
Also do you get any errors in your rpt?
-
And that should work for the setdir command of vehicles too or it's better to use a setvehicleinit so that every client receives the command? I don't have it really clear on how this works but i think that even though they're both caused by locality they are two different problems. I read the topic on the wiki to inform myself but i am still not sure on what way to solve this.I think that the reason your having a problem with the veh not facing the correct direction is a timing issue, but this is just a guess. By that I mean the timing is off between when the veh is created then moved and then set dir.
Normaly the use of setVehinit is frowned upon. It creates a lot of un-needed network traffic and it is used a lot by hackers.
These veh are empty so they are local to the server, if your going to use that respawn script, I would just call a small script from the init of the veh, in that script limit it to only run on the server and then setdir, then I would try using modletoworld command to move the veh. That will force it to keep its dir that you just set.
I would stop tryint to do it all in the init of the veh which gets processed on all clients
-
See this post: http://forums.bistudio.com/showthread.php?137110-MP-Dynamic-mission-questions&p=2187562&viewfull=1#post2187562
And you should read this guide : http://community.bistudio.com/wiki/6thSense.eu:EG
Your having some of the same problems.
basically you need to create a player init that runs locally to ensure it is being run on the correct machine and client.
-
The init's are some of the first things to run when you start a mission. Some times it may try and run the script and the mission may not have fully started yet and the Unit has not been created yet. To help out with this you can put a wait at the top of your script, like this:
waitUntil {time > 0};
That will make sure it does not run until the mission actually starts. But to be honest you will still probably have problems with jip, the inits of veh are gloabal you need a way to handle things locally weather they join at mission start or later, but unfortunitly the init.sqf does not always run for jip.
I think the best way to handle is the way xeno does it, with a player jip init. something like this:
place a trigger with the condition:
// this will make sure it only runs for the player on his local machine.
local player
on acct:
nul = [] execVM "jip_init.sqf";
Now name your players in the editor accordingly...
jip_init.sqf:
/// Start your load out script here along with any thing else you need to run locally.
your_loadout.sqf:
if (isServer) exitWith {}; _plr = player; switch (_plr) do { case p1: { //Change load out here }; case p2: { //Change load out here }; // etc... };
/// Beaten to it while I was typing in the post above lol.
Here is a good guide to learn more about multiplayer scripting:
-
It sounds like your having a locality issue and maybe a timing issue, please post more of your code and how you are calling it.
-
For the Heli problem I would suggest you try this script, it works great.
http://forums.bistudio.com/showthread.php?106653-Chopper-aerial-taxi-script
-
I can only give the logic, since you did not post a script or code but this is the basic ideas:
#1:
Check the distance and decide which is closest.
_buildingDist = _blueforPos distance _buildingPos; _VillageDist = _blueforPos distance _villagePos; if (_buildingDist < _VillageDist) then { // Make urals go to the Building waypoint } else { // Make urals go to Village waypoint };
#2:
We can just use a small script to check the distance and stop the urals if they get too close.
while {alive _ural1 && alive _ural2} then { _convoyPos = getPosAsl _ural1; _blueforPos = getPosAsl _bluefore; if ( (_ural1 distance _blueforPos) < 200) then { // Make convoy stop. }; sleep 1; };
Of course you will have to adapt this logic to your code but this is one way to do it.
-
Place a normal object, when you choose side, open the list and at the bottom will be an empty option.
But for the empty option to be availible you must have a player on the map.
-
It might have to do with permissions, but I don't think so. D:\ is not a problem.I'll start building a new system for the difficulty tab instead.
My code is a mess... Used this project to learn OOP and C#. It's starting to backfire when you reach 4000 lines of unordered code.
Time to refactor and rebuild a lot of objects!
Tophe,
If you need some help let me know, I have some C# exp. I understand if you don't want to open up the entire source, I would be willing to help out where needed even on just small blocks of code.
This tool has been a great help to me testing my scripts and addons in a dedi enviorment, I don't mind helping out in return.
publicVariableServer? Was it removed?
in ARMA 2 & OA : MISSIONS - Editing & Scripting
Posted
I'm not sure about this command, I have never use it, but you don't need it. You can do the exact same thing with setVariable.
_missionNameSpace setVariable ["myVariable", 123]; // server
_myotherobject setVariable ["myVariable", 123]; // player or object.
That will do the exact same thing,