Jump to content

nomadd

Member
  • Content Count

    371
  • Joined

  • Last visited

  • Medals

Posts posted by nomadd


  1. I have a question about multiplayer framework, can't seem to find any good information on rexecvm.

    Yes I have looked at http://community.bistudio.com/wiki/Multiplayer_framework

    if I have a script: nul = this exevm "myscript.sqf". How do I use it with

    [nil,nil,"per",rExecvm,"myscript.sqf"] call RE;

    does _this in my script get defined by RE?

    or if it has multiple paramaters: [par1,par2] execvm "myscript.sqf"

    [nil,nil,"per",rExecvm,"myscript.sqf","where do the params go?"] call RE;

    I want to execvm a script for all clients and jips and this seemed like an easy way to do it, but can't seem to get it to work right.

    Nomadd


  2. @Max Power

    If I go into ,say, A2+OA editing and use search forum , no matter what I try to search for I get nothing but

    vBulletin Message

    Sorry - no matches. Please try some different terms.

    I have tried searching for just one word , multiple words etc. The old boards worked fine, I have not changed anything and that maybe the problem. I may need to change something. The only search that works for me atm is the search in the top right that searches everything and that is not helpful if i need some info on addaction inside the editing and scripting subforum.


  3. Here is a snippet of the spawn script I am using.

    private ["_Locations","_pos","_units","_unit","_randomunits","_grp","_wp"];
    _Locations = [sp1,sp2];  // game logics
    _pos = _Locations select floor(random(count _Locations));
    
    _units =  ["uns_nva5sni","uns_nva5sni","uns_nva5sni","uns_nva5sni","uns_nva8b","uns_nva8a","uns_nva3mg","uns_nva2med","uns_nva4rpg","uns_nva8g","uns_nva7rto","uns_nva8d","uns_nva8f","uns_nva3amg","uns_nva8h","uns_nva4arpg","uns_nva6sap","uns_nva5asni"
    ];
    _unit = count _units;
    _randomunits =
    [
    _units select random _unit,_units select random _unit,_units select random _unit,_units select random _unit,_units select random _unit,_units select random _unit,_units select random _unit,_units select random _unit,_units select random _unit,_units select random _unit,_units select random _unit,_units select random _unit,_units select random _unit,_units select random _unit
    ];
    
    
    _grp = [getpos _pos, east,_randomunits ,[],[],[],[],[4 + random 4,0]] call BIS_fnc_spawnGroup;
    _grp allowFleeing 0;
    _wp = _grp addWaypoint [getPos attackmrk, 1];
    _wp setWaypointSpeed "FULL";
    _wp setWaypointType "SAD"; 
    _wp setWaypointFormation "LINE";
    _wp setWaypointCombatMode "RED";
    {   _x setskill ["aimingAccuracy",0.30];
       _x setskill ["spotDistance",0.50];
       _x setskill ["spotTime",0.50];
       _x setskill ["courage",1]; 
       _x setskill ["commanding",1]; 
       _x setskill ["aimingShake",0.30];
       _x setskill ["aimingSpeed",0.50];
       _x setunitpos "up";
    } forEach units _grp;

    I am adjusting the skill of the units as they spawn. Instead of doing this in the spawn script , is there a way to have the server run a script on all units/vehicle including any that spawn.

    I hope this make sense. I am not sure the best way to ask this question my scripting knowledge is limited.


  4. Been while since I have posted here, but still playing/making missions with Unsung. Think I may have found out why my rpt keeps getting spammed with

    Error in expression <//	Correction for custom throw weapons i>
     Error position: <//	Correction for custom throw weapons i>
     Error Invalid number in expression
    Suspending not allowed in this context
    Error in expression <sleep 0.1;>
     Error position: <sleep 0.1;>
     Error Generic error in expression

    I opened up the east.pbo to try and get the group names so I can spawn groups of enemies. In the process I noticed this

    class EventHandlers

    {

    init = "[_this select 0] exec ""\uns_east\scripts\init.sqs"";";

    };

    So i looked at the init.sqs. I get the spam every time a unit spawns. The init.sqs is

    //	Correction for custom throw weapons in ArmA2
    
    _unit = _this select 0; 
    
    _unit removeWeapon "Throw";
    _unit removeWeapon "uns_Throw";
    
    sleep 0.1;
    
    _unit addweapon "Throw";
    _unit addweapon "uns_Throw"; 

    I am not an expert but this looks like .sqf not .sqs which would cause the spam. I am not sure if this is even the problem. I haven't tried changing anything 1. because I don't have permission and 2. because I do not know what I am doing.

    Anyway, I hope this mod is still supported. It is one of my favorites to play.

    Nomadd

    note: I still have not had any luck pulling group names to spawn groups. I am just using an array of names to spawn units and making them into a group.


  5. @carlostex

    Looks like a nice neat spawn script. I am going to try it out. Do you know if you put ,say 20 different units in the unit array and then use the paramater to limit the number of units per group to 10, will it pull the first 10 in the array or will it select 10 randomly from the array?

    I will test the script, but thought you might know. I would like it to pull them randomly.

    Nomadd


  6. It was a hosted game. So I would just change the difficulty level depending on the mission and what the group I was playing with felt like doing. Sometimes it is just fun to play ARMA and blow sh*t up. May not be realistic but who cares it is just a game, of course other times it is fun to play as real as possible.

    Doesn't really matter much now. Most everyone I was playing with have moved on the other games. I still enjoy learning more about scripting and making missions .

    Nomadd


  7. I am using a snippet of code from GDT spectate(credit to GDT for the code). In the paramaters you can enable or disable 3rd person view. The question is how will this effect mp? Will it work on all players? Testing it in the editor it works fine, but I know when I host, things sometimes work differently.

    sleep 0.1;

    while {true} do {

    sleep 0.1;

    waitUntil {((cameraView == "External") and ((vehicle player) == player) and alive player)};

    (player switchCamera "INTERNAL");

    };

    I am calling the .sqf from a trigger. The activation being based on what the paramarray is.

    I did it this way to have the option to play a mission more hardcore or to be able to play it a bit more relaxed.

    Nomadd


  8. @admiralgrrr

    When you get to the screen with continue button at the bottom wait until CBA pops up/initializes then click continue. Think you maybe clicking continue too fast. I had the same problem with the planes starting in the water and not on the deck. This fixed it for me.

    Someone with more knowlege than me can probably tell you why. I just know I have to wait , then click continue and everything works fine everytime.

    Nomadd

×