Jump to content

poweruser

Member
  • Content Count

    248
  • Joined

  • Last visited

  • Medals

Everything posted by poweruser

  1. poweruser

    countFriendly BUG?

    I can only confirm this for the time period during the mission initialisation. After that (a few seconds after mission start) everything works as expected, even if (in this example) the player doesnt know anything about the T72.
  2. poweruser

    Detecting Dead Unit...

    Yes, the whole expression. To answer your edited question: That script I posted is written in sqf, you run it with: Â <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[] execVM "scriptfile.sqf"; Â When you run it from a init line in the mission editor you need to assign the return value to a varibale (any), like <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">temp = Â [] execVM "scriptfile.sqf"; Â Otherwise ArmA will spit out a "Type Script, expected Nothing" error Edit: When you're not sure what the return value is for some expression you can simply check it in game with a radio trigger. On Activation: Â hint format["%1", !(canmove tank3)];
  3. poweruser

    Detecting Dead Unit...

    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">isNil "tank3" Returns 'false', when the variable "tank3" has been initialised (which happens when the 3rd t72 is created) Otherwise true The real problem here is, that the expression <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">!(canMove tank3) can not be evaluated, when tank3 was not created. It returns neither 'true' nor 'false' but 'bool' (its datatype). That causes every expression it is part of, to return 'bool' as well. And the triggers can't handle this returned value. You need to split up those checks, for example in a little script which replaces the trigger: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">if(isNil "tank3") then { Â Â Â Â waitUntil { Â Â Â Â Â Â Â Â !(canMove tank1) && Â Â Â Â Â Â Â Â !(canMove tank2) Â Â Â Â }; } else { Â Â Â Â waitUntil { Â Â Â Â Â Â Â Â !(canMove tank1) && Â Â Â Â Â Â Â Â !(canMove tank2) && Â Â Â Â Â Â Â Â !(canMove tank3) Â Â Â Â }; }; tanksdead=1; hint "Tanks are dead"; Edit: this works as well: Condition: Â Â Â Â {(canmove _x)} count [tank1,tank2,tank3] == 0 Activation: Â Â Â tanksdead=1; hint "Tanks are dead"; 'count' ignores the 'false' and 'bool' cases and counts only expressions that are 'true'
  4. Check your briefing for missing 'close paragraph tags' ( Â </p> Â ) It got 35 opening ones, but just 21 closing ones.
  5. poweruser

    Hide radio command

    setTriggerActivation Give your 'call for extraction' trigger a name (i.e.: triggerExtraction) in the mission editor set that trigger to: Â Activation: NONE You'll make it available to the players by running this command: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">triggerExtraction setTriggerActivation ["ALPHA","PRESENT",false];
  6. poweruser

    error can't find bin cpp then starts black screen

    Reinstall it, useless you've made a backup copy of the original game files you overwrote first. There is a rule (at least for me): Never ever put/replace anything in the original game folders (\Addons & \Dta), always create a modfolder for whatever addon or mod. Even if you could fix the bin.pbo to make your game work again, i wouldn't recommend that as you'll have trouble in multiplayer when joining servers. You won't be able to join any server that is using signature verification, and get kicked off. And when their admins see you joining with a modified bin.pbo you will be probably banned as well.
  7. poweruser

    [ISSUE]Fixed Wing Turret

    armatech, in the code you posted now, you're missing the line which defines the local varibale _uavdir. To speed things up, here's the whole script: (i threw out the code which isnt used) <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">private["_UAVunit","_target","_y","_x","_posA","_posB","_posAasl","_posBasl","_distance","_dir"]; _UAVunit = _this select 0; _target = player; while { alive _UAVunit } do {     // Elevation     _posAasl = getposasl _UAVunit select 2;     _posBasl = getposasl _target select 2;     _distance = (_UAVunit distance _target);     _x = (asin ((_posBasl - _posAasl) / _distance));     vehicle _UAVunit animate [ "ani_PredatorpancamX", _x];     // Rotation     _posA = vehicle _UAVunit modelToWorld [ 0,  5.0, -0.8 ];     _posB = getpos _target;     _dir = ( ( _posB select 0 ) - ( _posA select 0 ) ) atan2 ( ( _posB select 1 ) - ( _posA select 1 ) );     _y = ((_dir - (getdir _UAVunit)) * 2*pi / 360);     if(_y < -pi) then { _y = _y + 2*pi; };     vehicle _UAVunit animate ["ani_PredatorpancamY", _y];     sleep 0.01; };
  8. poweruser

    [ISSUE]Fixed Wing Turret

    replace line 28 in "ballmove.sqf" with these: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_y = ((_dir - _uavdir) * 2*pi / 360); if(_y < -pi) then { _y = _y + 2*pi; }; and use a while-do loop instead of letting the script execute itself again
  9. poweruser

    Geometry problem + LandContact Q

    http://ofp.gamepark.cz/_hosted/brsseb/tutorials/lesson1/lesson1_c.htm That's true for the ShadowVolume lod, not for the Geometry lod. See here for its criteria: http://community.bistudio.com/wiki/LOD#Geometry
  10. poweruser

    custom sound files

    The mission itself looks for content in its root directory only, all contents in subdirectories or addons have to be stated: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">sound[] = {"\Sound\SiC_line1.ogg", db+20, 1.0}; edit: corrected the line of config code
  11. poweruser

    custom sound files

    I didn't suggest to rename the sound file, but the class name of that sound. And post the CfgSounds class of your description.ext
  12. poweruser

    Radio Chat in Cutscene ?

    They work for me, just tested it with this code snippet (sqf) <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">private ["_pname","_camera"]; _pname = name player; _camera = "camera" CamCreate [0,0,0]; _camera cameraeffect ["internal", "back"]; _camera CamSetTarget player; _camera CamSetRelPos [0,-10,5]; _camera CamCommit 0; waitUntil { camCommitted _camera }; sleep 3; Â player sideChat format["This is %1 calling HQ, over", _pname]; _camera CamSetRelPos [20,0,30]; _camera CamCommit 10; sleep 1; Â [west,"HQ"] sidechat format["This is HQ, we read you %1. out", _pname]; waitUntil { camCommitted _camera }; _camera cameraeffect ["terminate","back"]; camDestroy _camera; Unitname is here just a variable pointing to a unit that you gave that name (in the mission editor). So change it to what ever you called the soldier, who sends the radio message. yes
  13. poweruser

    Radio Chat in Cutscene ?

    http://community.bistudio.com/wiki/Description.ext#Radio_Sounds If you just want to display some radio-text without playing a sound, use these commands: globalChat, sideChat, groupChat, vehicleChat
  14. poweruser

    custom sound files

    That's probably a sound file from warfare. (\Addons\warfare.pbo) warfare\Sounds\Sushi\warfare_08.ogg warfare\Sounds\Sushi\warfare_08b.ogg defined in the warfare\config.bin: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class CfgSounds { Â Â Â class RequestFireMission0 { Â Â Â Â Â Â name = ""; Â Â Â Â Â Â sound = {"\Warfare\Sounds\Sushi\warfare_08.ogg", 1, 1}; Â Â Â Â Â Â titles = {}; Â Â Â }; Â Â Â class RequestFireMission1 { Â Â Â Â Â Â name = ""; Â Â Â Â Â Â sound = {"\Warfare\Sounds\Sushi\warfare_08b.ogg", 1, 1}; Â Â Â Â Â Â titles = {}; Â Â Â }; }; But I don't see how that relates to your problem. Try a different class name for your sound, like: 'SiC_line4', could be that 'line4' is already defined somewhere and you're overwriting it and that messes things up.
  15. poweruser

    Can't create my own dedicated server?

    Wiki: Server config files Server Basic Config file Server Config file Server Difficulty Settings file @ck-claw: you should check those sites too and correct the config of your server, if thats the config that you've posted. belongs into the difficulty settings file (profile) and '2' is invalid for this setting. '0' is off and '1' is on belongs into the basic config file your server is checking data of OFP ?! When will people learn that in a array definition, there's no comma behind the last entry (marked in red)
  16. poweruser

    New Server Troubles

    Take a look at the arma error report file (arma_server.rpt) that has been created on the dedicated server. It normally tells you what's going wrong.
  17. poweruser

    custom sound files

    In the description.ext, sounds and music are defined in different classes. For the sounds on the soldiers you probably want to you the command 'say', so you have to define this sound in 'class CfgSounds'. While your music is in 'class CfgMusic' and played by 'playMusic' http://community.bistudio.com/wiki/Description.ext#Sounds
  18. poweruser

    FFN MOD

    You really need to redesign the script system in this mod, so that there is 1 looped script running per side or at least per group, but having several scripts running per single unit is insane and a total performance overkill. This video mentioned above confims that.
  19. What did you set the 'dispersion' value to? If you have set it to 0, then the ai settings are kinda disabled, as 0*something is always 0
  20. Of course it won't work the way you wrote it. Now pulledout is type OBJECT, but the pVEventhandler is expecting an ARRAY (checking with the command 'in' ). When sending over a certain crew member, check with this line: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">if (player == (_this select 1)) then { or convert the variable pulledout from OBJECT to ARRAY, and leave the check with 'in' <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">pulledout = [(_crew select 0)]; For testing if you received something at all, move the hint message out side of the if-check, because when the condition is false you won't see anything and don't know whether you received something or not. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">hint format["Executed on victim's PC - Var-Name: %1 - Var-Value: %2", (_this select 0), (_this select 1)]; Displays what pc#2 received. (for debugging)
  21. One solution is to define a publicVariableEventhandler on all client machines (in the mission init.sqs for example) <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">DF_kickedout_crew = []; "DF_kickedout_crew" addPublicVariableEventhandler {         if(player in (_this select 1)) then {               // execute your script for the camera screen here         }; }; To the script that ejects the units, add something like this right after the command that ejects the unit/s. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">DF_kickedout_crew = (crew vehicle player) - [player];  // or some other array of units in the vehicle publicVariable "DF_kickedout_crew"; Maybe it's better not to run the "eject command" on a remote machine (PC #1) but on the machine where the ejected unit is local to (PC #2). Might behave better in case there's some lag. And this solution requires at least ArmA v1.09b, as earlier versions don't support broadcasting arrays.
  22. poweruser

    A-Team

    take a look at: Â www.stargateassault.net
  23. ARMA : CONFIGS AND SCRIPTING (addons) » NightVision colour
  24. poweruser

    Script help

    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">call format [{ [{Ncode1 = ""%1""}] exec {publicCode.sqs}}, _code]; This format-construct will make sure that the variable '_code' is evaluated first, before the message is send.
  25. poweruser

    Script help

    Broadcasting Strings via publicVariable isnt supported in Ofp, it is since ArmA v1.00 If you still want it to be a String, try this script: OFP : MISSION EDITING & SCRIPTING >> addAction play sound for all ? 3rd post
×