Jump to content

Rosso777

Member
  • Content Count

    130
  • Joined

  • Last visited

  • Medals

Posts posted by Rosso777


  1. @wogz187 Dude... this is awesome.  It’s so spot on and unlike EVERY bit of ridiculous code-garbage that I was trying to piece together (because I know virtually nothing, I merely conceptualize). 

     

    Skimming through this, I have so many questions about what specific things mean. 
     

    Oh, and after giving up on the above code we were initially discussing, I began delving into functions and eventhandlers (per your recommendation) and quickly realized I was WAY out of my league. So... I began messing around with the randomizing pseudo-damage handler idea from earlier. Now, i know,  I know... I don’t need all this sqf garbage and it overcomplicates things, but it seems to make more sense to me at this point in my learning. My thought is: learn the basic concept of HOW things work (cause and effect, links from IF to THEN), then clean it up with Functions. Then figure out how EventHandlers work into the process. Or vice verse if that’s the case. 
     

    And quite frankly I’ve been afraid to admit all this because I didn’t want it to come across as me being ungrateful or stubborn— it’s just how my brain seems to process all this stuff at this point.  Here is what I've been working on:

    Spoiler


    // Random-Chance Damage file


    private["_unit","_selectionName","_amountOfDamage","_sourceOfDamage","_typeOfProjectile"];
    _unit             = _this select 0;
    _selectionName    = _this select 1;
    _amountOfDamage   = _this select 2;
    _sourceOfDamage   = _this select 3;
    _typeOfProjectile = _this select 4;


    this allowDamage true;
    this setVariable ["you_damage", 200];

    you_fnc_handleDamage = {
    params ["_target", "_damage"];
    private _damage = _target getVariable "you_damage";

     

    if (alive player) then
    {
      if (((damage player) <= 0.80) && ((damage player) >= 0.60)) then { [] execVm "injured.sqf" };
    // if not randomizing damage amounts (because now we have a 200% HP pool with the "you_damage" Variable), this may be unnecessary
     

    if (((damage player) <= 0.59) && ((damage player) >= 0.39)) then { [] execVm "knockdown.sqf" };
    // Player will be forced into PRONE stance for 1 second, and then allow them to get back up (use a falling animation?)

     

    if (((damage player) <= 0.39) && ((damage player) >= 0.19)) then { [] execVm "brokenlegs.sqf" };
    // Player will be forced into PRONE stance until being using Morphine (or being healed to full if Morphine cannot be used)
     

    if (((damage player) <= 0.19) && ((damage player) >= 0.01)) then { [] execVm "unconscious.sqf" };
    // Unconscious file will contain a random chance for unconscious for 5-30 seconds

     

    if (damage player) < 0.01) then { [] execVm "death.sqf" };
    //player death file will contain a random chance to 1) DIE or 2) Allow Revive OR 3) always allow for revive but it will have a chance to fail
    };

     

    So once I have these "connections" working to react accordingly with player damage received, then my next step is to ensure that the corresponding .SQF file works correctly. Once I am successful, the goal will be to rewrite one of the above sections (if-then) into a more clean version without using an SQF. 

    • Like 1

  2. 1 hour ago, gc8 said:

     

    I believe they are all active. selections means they are parts of the 3D body. you know.. "head", "spine1" etc

     

     

     
    Okay, I think I’m beginning to understand the system. So @wogz187, by your code logic example above, we’re turning player damage (received) OFF, then we’re essentially ‘choosing’ which hitParts we want to consider in the overall ‘rolling of the dice’. Is this right?

    • Like 1

  3. @wogz187 wow. Okay my first question is: are you a teacher or instructor? I am, and your way of articulation and guidance is refreshing; especially in an arena such as this.

     

    my second question is: this should all be able to be done in one file, correct?
     

    I very much appreciate your time and effort here; I’m going to dig into this and I’ll update you as I go. Thank you!

    • Like 1
    • Thanks 1

  4. 7 hours ago, wogz187 said:

    "Consider you cannot use a regular "hit" EH because damage is disabled (it won't register). The "hitPart" handler I suggested will return the part that got hit--"

     

    I just want to make sure that I understand what you're telling me. Are you saying that I can't use the PlayerOnHit file, but I need to be doing all this inside a "PlayerOnHitPart" file? (Filenames may not be exact but hopefully you see what I mean).


  5. On 9/8/2020 at 10:01 AM, El' Rabito said:
    
    	class WaterSource
    	{
    		name = "Dirty Water Source (Barrels/Pumps)";
    		models[] = 	
    		{
    			
    			"misc_wellpump",
                		"pumpa",
    			"concretewell_02_f",
    			"water_source_f",
    			"waterbarrel_f", 
    			"land_pumpa"
    			
    		};
    	};

    The classnames have to be in lowercase.

     

     

     This was the solution. Thank you!


  6. 1 hour ago, wogz187 said:

    @Rosso777,

    Yes. Here's an idea to get you started,

      Hide contents

    check the wiki (random) for different distribution methods.


    Have fun!


    Thanks, Wogz! It seems a bit over my head but I love the challenge. I am going to dig into it now; I will post what I come up with for some feedback.

    Edit: @wogz187 Does this seem like the direction I should follow? https://community.bistudio.com/wiki/selectRandomWeighted

     

    Edit 2:  Here is my thought process:

     

    In the player's onHit file,  I can use something like:

     

    _scriptFile = ["unconscious.sqf", "brokenlegs.sqf", "injured.sqf", "death.sqf"] selectRandomWeighted [0.15, 0.3, 0.5, 0.05 ];

    execVM _scriptFile;

     

    and then script an .sqf for each instance.

     

    Thoughts?


  7. My Zeus was working fine, and suddenly it just stopped. I am wondering if there is an error here. Can anyone see any problems here? (This is from my mission.sqm)

     

    class Item0
            {
                dataType="Logic";
                class PositionInfo
                {
                    position[]={13095.38,0.90416986,8473.166};
                };
                id=0;
                type="ModuleCurator_F";
                atlOffset=-5.9604645e-008;
                class CustomAttributes
                {
                    class Attribute0
                    {
                        property="ModuleCurator_F_Owner";
                        expression="_this setVariable ['Owner',_value,true];";
                        class Value
                        {
                            class data
                            {
                                class type
                                {
                                    type[]=
                                    {
                                        "STRING"
                                    };
                                };
                                value="765611979772xxxxx";  (my Steam ID) ( I have also tried #adminLogged, to no avail)
                            };
                        };
                    };
                    class Attribute1
                    {
                        property="ModuleCurator_F_Forced";
                        expression="_this setVariable ['Forced',_value,true];";
                        class Value
                        {
                            class data
                            {
                                class type
                                {
                                    type[]=
                                    {
                                        "SCALAR"
                                    };
                                };
                                value=0;
                            };
                        };
                    };
                    class Attribute2
                    {
                        property="ModuleCurator_F_Name";
                        expression="_this setVariable ['Name',_value,true];";
                        class Value
                        {
                            class data
                            {
                                class type
                                {
                                    type[]=
                                    {
                                        "STRING"
                                    };
                                };
                                value="";
                            };
                        };
                    };
                    class Attribute3
                    {
                        property="ModuleCurator_F_Addons";
                        expression="_this setVariable ['Addons',_value,true];";
                        class Value
                        {
                            class data
                            {
                                class type
                                {
                                    type[]=
                                    {
                                        "SCALAR"
                                    };
                                };
                                value=2;
                            };
                        };
                    };
                    nAttributes=4;
                };
            };

     

     

    EDIT: I just noticed this in the report log: ""SC/log: ERROR: Ross is trying to create a Curator logic ModuleCurator_F.""   Any ideas?


  8. Hoping someone can point me in the right direction, even if it's by way of a relevant thread that can help me figure this out.

     

    I've tried to many different addons and scripts for implementing a wounding system to my private dedicated Exilemod server. No dice. Nothing works correctly.

     

    I am wondering if there is a way to essentially roll a virtual dice when a player gets hit. Ignore calibers/explosions, etc., just simply put: If a player gets shot, the dice rolls. Out of 100, if it rolls between 1-10, the player dies. 11-30, the player goes unconscious. 31-50, the player's health drops below 50% and goes prone until healed full. 51-100, the player's health drops to 50% with no other consequences. It makes sense that the total should equal 100 and at any point, I can adjust the measures as I see fit.

     

    I articulate this all so specifically so someone can say, "No, this part won't work" or "you're better off trying it like this" and so on. I know I've seen randomized "dice" scripting somewhere in addons, at least I am pretty sure that's what I was looking at.

     

    Any help is appreciated.


  9. I am trying to add an action so that when you are looking at another player who has 50% hp, you can use a first aid kit to heal them. I can get the action to call correctly if I set the condition to "true", but for some reason, the way I have set these conditions is not working. Can anyone see why?

     

    class BuddyAid: ExileAbstractAction
                {
                    title = "First Aid";
                    condition = "((ExileClientInteractionObject getVariable [damage player > 0.1]) && (magazines player find 'FirstAidKit' >= 1))";
                    action = "_this call Bones_fnc_HealTarget";
                };


  10. 58 minutes ago, pierremgi said:

    Mind for the position of the trigger (I just changed getpos _this (my test) for getpos unit1, or wherever you want to spawn this trigger).

     

    Going to mess with this later today, thanks Pierre. I am also digging through your Advanced Modules from Steam and... damn man... you're impressive. This is amazing stuff. Hoping I can learn by digging through this and seeing how you did things.


  11. @pierremgi  So very helpful, thank you sir. You answered so many questions for me in your post. The way you explained the usage of init and how the first player in a trigger will activate it, and then needing to repeat it for all players afterwards... brilliant. I had no idea how any of that worked. Now I have a great place to start with the information that you and Larrow have both given me.


  12. @Larrow Wow. I don't even know what to say to that post... your knowledge is impressive and I appreciate EVERYTHING you put into it; especially your advice to take what the editor gives me and learn from it. This is something I have been working on lately, as I've printed out and been perusing multiple script tutorial guides.

    The fact that you not only took the time to respond with helpful information as well as REWRITE what I was trying to accomplish, I am going to buy you a couple beers, per your signature. Thank you sir. I will take your information and code and learn from it... which should be much easier to do now that I can compare what the editor gave me with what YOU wrote. Simply awesome.


  13. 2 minutes ago, pierremgi said:

    I didn't know this method... playing with 3den layers and items as in mission.sqm???

     

    For 3den, I'm using create3denEntity... Once in mission, I just spawn units...

    Anyway, your trigger is "VEHICLE" "PRESENT" but it seems not linked to a vehicle.

     

    Hi Pierre. First of all, you're a legend in my book. I've seen you in these forums and you're a rockstar; I've been reading all your stuff.

    This method has been working for me because my server is private and with family only. I have been able to do A LOT because it's just three of us and I can control everything as we play; it's great. But with this trigger, yes, I know it says Vehicle, but this was just the AI testing method; get the AI to walk into the trigger and when he does, hint "this trigger worked!" or something like that.  Nothing has worked. No hints, no waypoint hints, nothing. However, everything I have spawned, including groups, waypoints, AI group settings, loadouts, convoys... it's all perfect. EXCEPT THESE TRIGGERS! UGH! I am going to checkout that create3denEntity now. Thank you. I will update.

×