Jump to content

computermancer

Member
  • Posts

    255
  • Joined

  • Last visited

Reputation Activity

  1. Like
    computermancer reacted to RimBlock in [TUTORIAL] How to use Public Variables   
    Late to the party as usual but just a couple of suggestions on the code.
     
    In the _playersToSend loop, count is faster than forEach if you don't need to use the _forEachIndex special variable in the loop code.
     
    nearentities is also faster than nearestObjects.
     
    if (isPlayer _x) then {}; will detect if the player is a human player.
     
    Hope this helps.
  2. Like
    computermancer got a reaction from hambeast in [TUTORIAL] How to use Public Variables   
    Yeah, thanks for your help in understanding PVEH, making the server do stuff for me was a big weakness of mine in my scripting arsenal.  :ph34r:
  3. Like
    computermancer reacted to Zupa in [Server Addon] ZCP - Zupa's Capture Points 2.0 Updated for Epoch 0.3   
    I do NOT give hosts permission to ask money for installing this on people's servers.
     
     
    ZCP - Zupa's Capture Points
     
    Current Version 2.0
     
     
    An independent addon for your Epoch server.  
     
    This will spawn random bases (How many you configured) on the map which the player can go to and start capturing. 
     
    This does not involve any AI. This addon focuses to direct PVP action more to those places for people that actually want the danger.
     
     
    How it works:
     
    Players will get a notice that a camp has been set up that they can capture.
     

     
     
    If they look on the map they can see the marker with a certain color:
     
    Green  ->      Not being captured and not contested. Purple  ->      Being captured by a player ( and his group) and not contested. Red      ->     Being captured and being contested by someone else.  

     
     
    Ariving at the spot there will be a base to give a little battle arena / defending position.
     

     
    A message will warn all players that a player started capping that specfic point.
     
     

     

     
    This base will vanish  1 minut after being captured succesfully.
     
    If someone died while capping. The capping status will be handed over to a new player in the zone. Timer is reset and you will be announced again on the right side of the screen.
     
    Group members does not effect contesting.
     
    Winner will receive a cash reward directly into their wallet.
     
     
    Future version will hold more features.
     
    Extra notices:
    You can make own bases and add them in the right folder and in the config. First object is the cappoint. Position does not matter, the script recalculates the positions ^^ Use M3Editor to build bases because the scripts uses that sqf markup.  Cappoints will choose a random base from the base list config each time they spawn. Easy to configure configs. No AI. Low influence on server performance. Easy to install ( very fucking easy) Best experienced on more populated servers, Cus this creates PVP. Not effective for PVE as long as there are no AI. I might add an AI option later that attacks the cappoint.  
    Maps
     
    This works on every map.
     
    But warning, the original base might be build with some AIA buildings, Those specific objects wil not spawn on a non AIA map. This will however not influence the script itself ( only buildings missing in the base).
     
    Make a little base yourself for example and put it in base1.sqf 
     
    Ill make a full non AIA base myself this evening.
     
     
    Planned Features
     
    Visual Timers AI option Contesting pauses cap time. ...  
    Changelogs 1.1
     
    [Added] configs to calculate  price on the amount of players online. [Added] configs to delay spawning until a specific amount of people are online. [Added] config to define time to wait for base cleanup. [Added] Anouncements on halftime and 1 minut mark for capturing.  
    Changelogs 2.0
     
    [added] Reward system : Krypto / Vehicle drop / Weapon or Build box. [added] More configs [added] More checks [fixed] Epoch 0.3 Krypto rewards. [changed] Code cleanup and optimization.  
    Github - Code
     
    https://github.com/DevZupa/ZCP-A3
     
     
    Install Instructions
     
     
    1) Pack the a3_epoch_server_zcp into a pbo and place it in the @epochive/addon folder of your epoch server.
     
    2) Add zcp.sqf to your mission
     
    3) Call zcp.sqf from init.sqf or anywhere u want :)
    execVM "zcp.sqf"; DONE.
     
     
    CONFIG
     
    Edit the boxes, cus they are really default ^^. Vehicle reward is disabled by default cus they don't save after restart without changin epoch code.
     
    Example Logs
    8:01:25 [ZCP]: Giving server some time to boot. 8:03:47 [ZCP]: Initiate Zupas Capture Points 8:03:47 [ZCP]: ZCP No 0 started. 8:03:47 [ZCP]: ZCP No 1 started. 8:03:47 [ZCP]: All Capture Points are running. 8:03:47 [ZCP]: Waiting 79 secs for next cap point. 8:03:47 [ZCP]: Waiting 80 secs for next cap point. 8:05:09 [ZCP]: Cap Point Alpha :Spawning dynamic on [11174.8,7836.09,0] 8:05:09 [ZCP]: Cap Point Alpha started. 8:05:12 [ZCP]: Cap Point Beta :Spawning dynamic on [3919.28,11111.1,0] 8:05:12 [ZCP]: Cap Point Beta started. 9:31:01 [ZCP]: Ansgar won Cap Point Alpha 9:31:02 [ZCP]: Cap Point Alpha cleaned up and ended. 9:31:02 [ZCP]: Waiting 119 secs for next cap point. 9:33:14 [ZCP]: Cap Point Alpha :Spawning dynamic on [2905.8,5070.86,0] 9:33:15 [ZCP]: Cap Point Alpha started. 9:59:10 [ZCP]: m0nster [MUR] won Cap Point Beta 9:59:11 [ZCP]: Cap Point Beta cleaned up and ended. 9:59:11 [ZCP]: Waiting 147 secs for next cap point. 10:01:46 [ZCP]: Cap Point Beta :Spawning dynamic on [9335.61,11222.1,0] 10:01:46 [ZCP]: Cap Point Beta started.
  4. Like
    computermancer reacted to mgm in Red Mage Admin Powers   
    Following your progress CM... What a journey it's been since your innocent earplugs script... As your scripting powers grow you realize the real potential in you...

  5. Like
    computermancer reacted to hambeast in [TUTORIAL] How to use Public Variables   
    just for shits and giggles, can you declare a clientside PVEH just to spit out some text?
    // Clientside PVEH (init this in your mission.pbo) if (!isDedicated) then { // expects [] "PVEH_PlaySoundClient" addPublicVariableEventHandler { systemChat "We got our PVEH"; }; }; try placing that in your init.sqf along with your server side one.  maybe declare this one first.
  6. Like
    computermancer reacted to hambeast in [TUTORIAL] How to use Public Variables   
    hmm... try adding _clientID to the private array at the top of the expression.  It could be a locality issue?  aside from that I'm not really sure.  
     
    I'll have to play with the code tonight and see if I can't generate you a sample pbo to play with
  7. Like
    computermancer reacted to hambeast in [TUTORIAL] How to use Public Variables   
    What you want to do is define a PVEH on the clientside (most likely in the init.sqf or a sqf file called from that) that when fired off, plays a sound.
     
    How you fire it off is the tricky part as you probably only want people in say a 30m radius to hear the sound.  You could be lazy and just fire it off to everyone.
     
     
    So here's how I would do it quick and dirty.  Note, there is probably a better way to do this but its monday...
     
    So, you need 2 pveh.
     
    1.  Serverside PVEH to get our call from our player and send to other players
    2.  Clientside PVEH to actually play the sound.
    // Serverside PVEH (Init this in your server.pbo) if (isDedicated) then { // expects [Player,Radius] "PVEH_PlaySoundServer" addPublicVariableEventHandler { private["_packet", "_sender", "_radius", "_playersToSend"]; _packet = _this select 1; _sender = _packet select 0; _radius = _packet select 1; _playersToSend = nearestObjects [_sender, ["CAmanBase"], _radius]; { _clientID = owner _x; PVEH_PlaySoundClient = []; _clientID publicVaribleClient "PVEH_PlaySoundClient"; } forEach _playersToSend; }; }; // Clientside PVEH (init this in your mission.pbo) if (!isDedicated) then { // expects [] "PVEH_PlaySoundClient" addPublicVariableEventHandler { // play sound code goes here }; }; Now please note, that the "get players within raidus" code is probably inefficient and probably buggy.  I'm sure there is a better way to do this and you are free to look into that part, I just wrote this up real quick to give you an idea on how you can do this.
     
     
    edit: sorry I forgot, somewhere in your code to kick this off, you will need to call a publicVariableServer command to kick it off like this:
    PVEH_PlaySoundServer = [player,30]; // [player,radius] publicVariableServer "PVEH_PlaySoundServer";
  8. Like
    computermancer got a reaction from hambeast in Red Mage Admin Powers   
    DnD feel powers I have working so far.... but many bugs need killing and settings need tweaking.
     
    - Ninja Teleport                     ( puff of smoke at both points of teleport)
    - Zeus Teleport                      ( lightning bolt strike before player appears) - Zeus's Fury                         ( lightning strike target) - Lucifer's Rage                     ( meteor strike type strike) - Necromancer's Prey           ( spawn 2 zombies by clicking map) - Psychic's Curse                  ( ESP, humanoids always, toggle vehicle view) - Human Torch                      ( Set on fire and fly around) - Finger of God                      ( Point and it dies) - God's Blessing                    ( Fully heal, option to make target a god) - Wanderer's Knowledge       ( Constant information on players location, dir, etc)
    - Observer's Knowledge        ( Constant information on what player is looking at)
    - FIghter's Wrath                     (Punch some fools)
     
    https://www.youtube.com/watch?v=tisIA7cavPs
  9. Like
    computermancer reacted to KiloSwiss in Red Mage Admin Powers   
    Freeze players by remotely set disableUserInput https://community.bistudio.com/wiki/disableUserInput

    Slow them down by increasing the fatigue value and/or decrease stamina.

    Make them dance via remotely execute doMove(now).

    Switch players into a goat or a rabbit.

    Give players a upside down vision or some fancy coloured vision via ppEffect.
  10. Like
    computermancer reacted to vbawol in 0.3.0.1 / RC2 Changelog   
    Testing is going well with only a few critical bugs reported so far, a new server build has been pushed to our test servers that address the following issues.   Server Side Changelog 0.3.0.1 b4: [Fixed] Crypto reset bug on death or fresh character. [Fixed] Server side vehicle immunity for 1 minute after initial server startup, should prevent accidental damage on spawn.
  11. Like
    computermancer reacted to hambeast in [TUTORIAL] How to use Public Variables   
    ok, I think I got them all.  If you see any more let me know.
  12. Like
    computermancer reacted to hambeast in [TUTORIAL] How to use Public Variables   
    did you try turning it off and on again?
  13. Like
    computermancer reacted to hambeast in [TUTORIAL] How to use Public Variables   
    FYI, this guide is for advanced arma coders.  This guide will assume you know how to pack/unpack PBO's, edit files, and are comrfortable with coding.  You must also have an understanding of locality as in client vs server side.
     
    A note on locality:  Your mpMissions folder is NOT only client side.  When I started coding I made this assumption and I was wrong.
     
     
    Lesson 1:  Event Handlers Basics
     
    Event handlers are the bread and butter of Arma2 MP coding.  They are little logic functions that the server sets aside until they are called by a public variable.  In my experience they have very low overhead so don't be afraid to make use of them.
     
    example 1: Change players skin
    Add this code to the bottom of your init.sqf (in your mpMission)
    // expects: [_playerUID,_CharacterID,_skinClassName] // this line says ONLY run on the ClientSide.  The server will see this and ignore it.  This means that when a client gets this command, they and only they will execute this. if (!isDedicated) then {   "PV_ChangePlayerSkin" addPublicVariableEventHandler {     // handle our packet.  _this select 0 returns the PV name, _this select 1 returns our input packet    _packet = _this select 1;  // should contain [_playerUID, _characterID, _skinClassName]    _playerUID = _packet select 0;    _characterID = _packet select 1;    _skinClassName = _packet select 2;       // set our player to the skin    [_playeruid,_characterID, _skinClassName] spawn player_humanityMorph;   }; }; Ok so now we got our event handler set up, if any client sends the PV "PV_ChangePlayerSkin" all clients connected will execute this event handler.  Here is how we send the command to all players.  This code can be called anywhere, on a client, or from the server itself.
     
    example:
      PV_ChangePlayerSkin = [_playerUID,_CharacterID,_skinClassName];   publicVariable "PV_ChangePlayerSkin"; But you may be asking, how do I set just a single player's skin instead of everyone on the server?   We do this with publicVariableClient.  I am unsure if you can call this command from clientside as I only use it serverside but here is how you do it regardless. // lets assume we want to set our cursorTarget's skin (the player we are looking at) _player = cursorTarget; _owner = owner _player; // owner command returns the client # we will need for the next step. _playerUID = getPlayerUID _player; _characterID = _player getVariable ["CharacterID","0"]; _skinClassName = "FR_GL"; // my personal skin PV_ChangePlayerSkin = [_playerUID, _characterID, _skinClassName]; _owner publicVariableClient "PV_ChangePlayerSkin"; // only send the PV to the specific client  
    Now when we send our public variable we only send it to the client we wish to.  There are a myriad of ways to get player objects loaded into memory but that will be covered later.
  14. Like
    computermancer got a reaction from DirtySanchez in Fulcrum Mission System v2.1a   
    _horbinSaysYes = _awesome; if (_awesome) then { [] call _HellYeahDude; } else { [] call _sadPanda; };
  15. Like
    computermancer reacted to SpiRe in Titan launcher won't lock on target   
    Looks like you guys having a fun time.
     
     
    The whole thread is like:
     
    https://youtu.be/YuuOy_4h9-c
     
     
     
    And finally please lock this thread before there will be one more: "Greez KiloSwiss" just because who the hell wants to read it in almost every post..
  16. Like
    computermancer reacted to mgm in Salvage Script   
    I have a dream one day you will use a central CHANGELOG :)
    keep up the good work!
  17. Like
    computermancer reacted to Cletis5 in M3Editor - A3 3D Editor   
  18. Like
    computermancer got a reaction from mgm in Salvage Script   
    I have been working on this script today and have added the following:
     
    - requires Multigun with Energy Pack
    - each salvage costs 5 energy from the pack ( 2 uses per small, 20 uses per lrg energy pack)
     
    I will update the public distribution later today or tomorrow,  :ph34r:
  19. Like
    computermancer reacted to horbin in Fulcrum Mission System v2.1a   
    1.5 is up.   Server side operation.  See github for specifics, but serverside FuMS enabled by default to make it easier for folks......   Encounters can now run on the server w/o a headless client....again see the GitHub.   Consider this a 'beta' 1.5 release if you are already running 1.4 on a live server.  I am off to Key West for the next week, but wanted to get this out before-hand.   Spam me with issues/recommendations.   *****Check new Installation instructions for the 'sounds' provided with the crazed clones. *****Check the /DOCS/ folder.   'man' page is your friend.....
  20. Like
    computermancer reacted to horbin in Fulcrum Mission System v2.1a   
    Its coming...I have some code working right now that allows AI to discriminate based upon a player's name...just still in the works.
     
    Trying hard right now to bust out this server side modification of FuMS...before I head to KeyWest for the next 10 days!....Last week of lobster season, and I'm looking for some good bottom time!
     
     
    Edit:  Oh find my issue... Array1 = [] + Array2 will make independent copies of an array.
       Array1 = Array2    just makes another reference to the same array.
     
    Give me C or C++ so I know when I am using pointers!!!!!..or atleast lets me override a constructor.
  21. Like
    computermancer got a reaction from King. in Fulcrum Mission System v2.1a   
    _horbinSaysYes = _awesome; if (_awesome) then { [] call _HellYeahDude; } else { [] call _sadPanda; };
  22. Like
    computermancer reacted to horbin in Fulcrum Mission System v2.1a   
    FuMS already does this admin thing, in a much more 'clean' manner.
     
    If you are desiring AI to follow you around and be your buds, wait till mid April. I should have that sort of logic worked out :)
     
    Aside from that, with FuMS you can spawn AI on yourself, or any other player,  you can even spawn a prison cell around a player if you so desire, then have a helo drop troops in the 'arena' with him.
     
    Its up to you. It's what FuMS was built for...build what you want, without having to fat finger the code!
  23. Like
    computermancer reacted to Suppe in [HowTo] Add Buildings or other Objects   
    In your: \Arma 3\@epochhive\addons\a3_epoch_server_settings.pbo are the different maps...
    unpack the pbo and open \configs\maps MAPUWANTTOEDIT.H  [ It is divided into the different maps. (Stratis, Altis, Cherno, add more if u need ...) ]
     
    Example:Altis.H start with:



    propsPos[] = {                                    //in the propsPos you can add houses, atm, waterbarrels or everything you want. just....
    propsPos[] = {
                    //trader city #1
                    {"Land_MarketShelter_F", { 13315.3, 14512.4, 0.0361125 }, 119.966},
                    { "Land_ScrapHeap_2_F", { 13315.9, 14499, 0.00584948 }, 255.706 },
                    { "classnameyouneed" ,    { X ,              Z ,       offsetY    }, azimut }           //  add more if u wish, but the last one without comma
     
    Important is only the last batch may not a "comma"  so, look at the "," at the end from the line.
     
    Build what you want with the A3 Editor, save coordinates for your cpp (press "copy Epoch CFG to Clipbord"), then past this in a empty txt file, or directly into the cpp.
    *with the custom pbo you can specify more features, such as set vector and so
     
    Repack the .pbo and ready 
     
    *If you want to build with the MCC Sandbox Tool or Zeus, save with MCC Sandbox (press "save all sqm"), then convert the coordinates and add this into the cpp. (Use the Mission converter)*
     
    The coordinates:



     
    useful tools and links:



  24. Like
    computermancer reacted to horbin in Fulcrum Mission System v2.1a   
    v1.5 preview: Should post tomorrow evening:  The big one being ServerSide FuMS support for those w/o Headless Client capability.
     
    -----v1.5--------  +CrazedClone AI Logic added  based upon Gulozwood scripting.    +MadScience Theme   At server start 9 random towns are chosen as infected zones.   When a player gets near the center of an infected town, the crazed clones materialize. crazed clones WILL attack AI too.     +SafeBase Code added   When an encounter is created at a random location, FuMS now checks for plot poles within 200m of the location. If any are found   FuMS then searches for players within 200m of each plot pole. If players are found, a new position is generated. If after   15 attempts a good position can not be found, the mission will spawn ignoring these plot pole, player checks.     +AI controlled vehicle ammo now follows AI's unlimitedAmmo flag defined in GlobalSoldierData.sqf  +BaseServer Option:      Added option in Loot section to zero out vehicle ammo the 1st time players occupy/capture an AI controlled vehicle.    +ServerSide FuMS enabled!  Due to the large potential load that FuMS can place on a server, some of the themes packaged with FuMS have been set to HC only. The   following themes will spawn as part of the default config. If additional themes are desired the BaseServer.sqf will need to be modified  by an admin:       SEM, Small, Aquatic, MadScience - default to run on Server AND HC's  HeloPatrols, TownRaid, Test - default to run on 1st HC's only   Note: ServerSide FuMS support is ENABLED by default. To turn OFF Serverside FuMS change line 14 of \FuMS\init.sqf to:    FuMS_ServerFuMSEnable = false;       OR ensure no theme is configured to run on the server (no values of -1 or 0 in BaseServer.sqf).   Default to ENABLED was set to support a larger range of players.     Note: For initial testing map notification for the MadScience theme is on, to allow admins to see how things will look, and to locate towns  to do their own testing. It is recommended that when you move to a live server to set line 14 of \FuMS\Themes\MadScience\SpawnTrigger.sqf to false to hide the 'infected' towns from players. This theme spawns in 9 random towns, so running it on both the server and the HC will make for a good party.   Note: Themes set with a -1 value in BaseServer.sqf will run on BOTH the server and all HC's that connect to the server. This will result in dramatic scaling of the number of missions running. As an example, the Aquatic theme spawns 3 water encounters and maintains 3 up at all times. This theme is configured to run on both the Server and HC's, so when an HC conncect, another 3 (total 6) aquatic encounters will be maintained. If/when the HC disconnects, FuMS will reduce the number of aquatic missions back down to 3.   Basically, themes with -1 set will run in duplicate, once on the server, once on the HC. (see BaseServer.sqf)
  25. Like
    computermancer got a reaction from OW_Reaper in Titan launcher won't lock on target   
    What's more personal then telling someone e what they are doing is wrong if it doesn't concern you?
×
×
  • Create New...