Jump to content

lkincheloe

Member
  • Content Count

    124
  • Joined

  • Last visited

  • Medals

Posts posted by lkincheloe


  1. I'm working on a script that allows for players to be non-combatants on a belligerent side (i.e. not civilian), however while expanding to nested If statements I have encountered an Error missing ) issue in the else statement, it's perplexed me and I think a rubber duck debug is in order.

     

    private ["_noncomState", "_wArray"];
    
    _noncomState = player getVariable "var_lk_noncom";
    
    _wArray = weapons player;
    
    if (count _wArray == 0) then
    
    	{
    
    	if (_noncomState == false) then
    	
    		{
    		
    		player setCaptive 1.44; hint "You are a non-Combatant!"; player setVariable ["var_lk_noncom", true]
    		
    		} else [];
    	
    	}
    
    else
    
    	{
    
    	if (_noncomState == true) then
    	
    		(
    		
    		player setCaptive 0; hint "You are a Combatant!"; player setVariable ["var_lk_noncom", false]
    		
    		) else [];
    
    	};

    This is the error that's produced:

    16:36:46 Error in expression <te == true) then
    
    (
    
    player setCaptive 0; hint "You are a Combatant!"; player se>
    16:36:46   Error position: <; hint "You are a Combatant!"; player se>
    16:36:46   Error Missing )
    16:36:46 File C:\Users\Lynn\Documents\Arma 3 - Other Profiles\Kinch\missions\n..., line 29
    16:36:46 Error in expression <te == true) then
    
    (
    
    player setCaptive 0; hint "You are a Combatant!"; player se>
    16:36:46   Error position: <; hint "You are a Combatant!"; player se>
    16:36:46   Error Missing )
    16:36:46 File C:\Users\Lynn\Documents\Arma 3 - Other Profiles\Kinch\missions\n..., line 29
    16:36:46  Mission id: 4964a4130cdf29b09d84b46e8d2333956209f5c6
    

     

    The error points to if (_noncomState == true) as being the culprit, however being formatted identically to the first part is confusing me. The script is initialized from a sequence starting from InitPlayerLocal.sqf, and the intent of the variable var_lk_noncom is to give the script something to check against so that the SetCaptive command isn't spammed every time a player's inventory changes state.

     

    Suggestions?


  2. Presumably, your cleanup script init starts by checking that it's on the server with !isServer. This works fine for 90% of implementations, but we're in the 10%. So we need to modify it.

     

    According to the isServer Wiki Page, the most likely best solution is to initialize the cleanup script globally, but run a isPlayer check instead of !isServer and if true, exit the script. This should cause it to exit on the player machines only, leaving the Server and HC machines free to delete empty groups as they encounter them.


  3. I've had that happen before, I don't believe the script is deleting the groups that are losing units due to being despawned properly. So eventually it'll run out of groups to work with. Like so:

     

    https://community.bistudio.com/wiki/deleteGroup

     

    With 650(!) zones, it's no wonder you're running out of groups quickly. I've used various scripts in the past to constantly clean the groups up, assuming you run something like DMZ Delete where you're spawning the units (server or HC) it should work.


  4. Classic locality issue, in order to strip items from a unit, the code has to be executed to where that unit is residing. For Single player that just means you can execute the script and it'll work because everything is local to the player.

    On MP however, units attached to a client are local to that client, which can be a player unit or units in the same group. And units not attached to a player are either local to the server or a Headless client if present.

    To start, look at this article from the wiki: https://community.bistudio.com/wiki/isServer


  5. Fixed that bit, the conversations was mistakenly included inside the RscTitles class.

    Now what occurs is I get the action, but I get an error stating that IP_DLG_CONVERSATION cannot be found when I try to use it.

    Currently here's where I have includes at, most other combinations result in a CTD when I start a local server:

    class RscTitles {
    #include "ais_injury\dialogs\rscTitlesAIS.hpp"
    #include "conv\cfg\defines.hpp"
    #include "conv\cfg\dialogs.hpp"
    };
    
    #include "conv\missionConversations.hpp"
    
    class CfgFunctions
    {
    #include "VAS\cfgfunctions.hpp"
    #include "conv\cfg\functions.hpp"
    #include "ais_injury\cfgFunctionsAIS.hpp"
    
    };
    
    

    And how they're being called in script, executed locally to the player:

    nul = [_target, "Hey, what can I help you with?", "Direct"] spawn IP_fnc_simpleSentence;
    
    nul = [_target, "opener"] spawn IP_fnc_addConversation;
    

    Where _target is the civilian.

    Sorry for all the poking, I'm not used to working with .hpp files.


  6. Trying to implement this into an MP scenario. Currently receiving this error on IP_fnc_addConversation:

    Error loading control C:\Users\Lynn\Documents\Arma 3 - Other Profiles\Kinch\mpmissions\co08_tf_titan_x1.Altis\description.ext/RscTitles/IP_DLG_SIMPLESENTENCE/Controls/IP_BOX_MAIN/

    and in-game I receive the "Conversation has no sentences!" hint error. Even though I'm pointing it to the default opener conversation.

    Only changes I've made thus far is removing RscTitles from dialogs.hpp since I have RscTitles brackets already defined in description.ext and having MissionConversations.hpp inside the conv folder. Any idea what might be messing up?


  7. What you could do is run the code generator only server-side, then when the players find the laptop send the code over as a public variable. Then when a player inputs the code, is returned back in a bis_fnc_mp call to the server. If correct, disable the bomb and whatnot, if incorrect, KABOOM!


  8. Got a little issue here:

    In my mission I have your wounding system and a gear-saving script working independently and automatically, and whenever someone goes down, your script removes their medical gear as intended (to prevent self-heals). However if the player elects to respawn, they do not receive their medical gear back because the gear keeping script sweeps through and detects that it's gone, and doesn't reassign it.

    My question is there a variable from your script that I can pass to the gear keeper script in order to keep it from nomming on the medkits while the player is down? (i.e. if player is in downed state, don't save their gear)


  9. Got an interesting problem for you.

    The way I use EOS in my mission, I have approximately 50+ AOs (markers) scattered all around Altis, most of which spawn EAST units. Lately it works flawlessly until the server gets halfway through, and we run out of bad guys to shoot at. From near as we can tell the script still works (I've had reports of vehicles spawning in OK but lacking crew members), it's just run out of groups to work with.

    Is there any way to make sure, when a marker is captured that it cleans up the groups used by EOS?


  10. This is something I'm working on for my pub server mission Resistance, but it might be useful for your projects.

    Download Link: http://www.mediafire.com/download/ddt4rx615zjih93/civ_opinions.zip

    Civilian Opinion and Interation (COI) is a framework package designed to make interaction with civilians possible.

    How to install:

    This script is designed to work with units spawned during the mission (like with BangaBob's COS script, for instance).

    Simply drop in the civ_interact folder into your mission folder, and copy the information fron the provided init.sqf into your mission's init.

    Then, depending on how you are spawning your civs, you'll want to add this line after where the civ is spawned:

    0 = [_unit] call lkco_fnc_addunit;

    Use:

    The script works by assigning a value to the civilian based loosely upon a global variable "Approval Rating", simulating a variance of opinions between individual civilians.

    This value in turn, dictates what kind of interactions are possible with the civilian.

    A few examples of possible interactions are included, mainly showing one method of lowering the approval rating through killing "good" civilians.

    Credits: I used Zuff's method of using bis_fnc_mp to make the example conversation script work in Multiplayer.


  11. I suspect the issue lies with one of the spawning packages going haywire and spawning groups until the limit is hit.

    If possible, could you try sending this version up and let me know if it still does it? http://www.mediafire.com/download/ic05idhd5f505pl/co_36_resistance_b13_4a.Altis.pbo

    To question #2, at some point yes but I want to get the features I want in done first. And also it'd be a new adventure in coding/scripting so I want to take my time getting it right once I get there.

×