Jump to content

PixeL_GaMMa

Member
  • Content Count

    43
  • Joined

  • Last visited

  • Medals

Community Reputation

31 Excellent

1 Follower

About PixeL_GaMMa

  • Rank
    Lance Corporal

Contact Methods

  • Website URL
    https://www.colinstewart.pw
  • Skype
    overhertzuk
  • Youtube
    channel/UC2YZMo0ZeILooQWMRXR5yaA
  • SoundCloud
    colin-stewart-29

Profile Information

  • Gender
    Male
  • Location
    Cyberspace
  • Interests
    Programming, Game Development, Music Production, 3D modelling, Photography

Recent Profile Visitors

1332 profile views
  1. PixeL_GaMMa

    AnL - Simple Arma 3 Server Tool

    As the title implies, I decided to put together a tool for me and my friends. I have many plans for improvements. But for now it is a basic and simple tool that gets the job done. It is designed to be simple and quick to use without any over complexity. A couple of screenshots: I want to share it with the community and will happily note any suggestions and requests. If you're interested in trying out a new tool, you can get it from https://colinstewart.pw/project/anl-13. Please bare in mind that this is the first initial version. It can be run from any directory, it does not have to placed inside of your Arma 3 installation directory. -Colin
  2. Can you show the sql statement you are passing? Or is this from first initialization of the library? Have you also placed the libmariadb files into Arma 3 directory? (required by the addon initialization process)
  3. BIS_fnc_spawnGroup returns a group ..... _grp = ...... call BIS_fnc_spawnGroup ; { .... } forEach (units _grp);
  4. PixeL_GaMMa

    vehicle randomization data

    After a short break away from screen, another look and I see my mistake, I forgot to add additional select 0 to all hit points array. { _veh setHitPointDamage [_x, (_hitPoints select _forEachIndex)]; } forEach ((getAllHitPointsDamage _veh) select 0) select 0; In-fact a better way would be { _veh setHitIndex [_forEachIndex, _x, false]; } forEach (_this select 5); Now it looks like damage is working, but a tire that is blown is back when re-loaded, I would have assumed the animation would correct this but it still does not work. :/ getting into the vehicle shows the wheels are damaged, but the physical model/animation for damage is not updated. OK, a bit re-ordering, and it seems to be working: // // PX_fnc_createVehicle :: Creates a vehicle from state array block via PX_fnc_getVehicleState // Author: Colin J.D. Stewart // Usage: _stateblock spawn PX_fnc_createVehicle; // PX_fnc_createVehicle = { private _veh = createVehicle [_this select 0, _this select 1, [], 0, "FORM"]; _veh enableSimulationGlobal true; _veh setVariable ["BIS_enableRandomization", false]; _veh setDir (_this select 2); _veh setFuel (_this select 3); _veh setMass (_this select 4); private _textures = (_this select 6); private _phaseData = (_this select 7); { _veh setObjectTextureGlobal [_forEachIndex, _x]; } forEach _textures; { _veh animate [_x, (_phaseData select _forEachIndex)]; } forEach (animationNames _veh); { _veh setHitIndex [_forEachIndex, _x, false]; } forEach (_this select 5); _veh; };
  5. PixeL_GaMMa

    vehicle randomization data

    Yes, it is executed directly on server as it is created (see function above)
  6. PixeL_GaMMa

    vehicle randomization data

    I've just updated my game mode to use the new functions, but it seems setHitPointDamage doesn't work globally, any idea what the problem could be?
  7. PixeL_GaMMa

    vehicle randomization data

    Excellent idea, we could also add per hit point damage // // PX_fnc_getVehicleState :: Get vehicles current state - Note: this does not save inventory // Author: Colin J.D. Stewart // Usage: _stateblock = _vehicle call PX_fnc_getVehicleState; // PX_fnc_getVehicleState = { [ typeOf _this, getPosATL _this, getDir _this, fuel _this, getMass _this, (getAllHitPointsDamage _this) select 2, getObjectTextures _this, animationnames _this apply {_this animationPhase _x} // thanks Grumpy Old Man here for help ]; }; // // PX_fnc_createVehicle :: Creates a vehicle from state array block via PX_fnc_getVehicleState // Author: Colin J.D. Stewart // Usage: _stateblock spawn PX_fnc_createVehicle; // PX_fnc_createVehicle = { private _veh = createVehicle [_this select 0, _this select 1, [], 0, "FORM"]; _veh enableSimulationGlobal true; _veh setVariable ["BIS_enableRandomization", false]; _veh setDir (_this select 2); _veh setFuel (_this select 3); _veh setMass (_this select 4); private _hitPoints = (_this select 5); { _veh setHitPointDamage [_x, _hitPoints select _forEachIndex]; } forEach (getAllHitPointsDamage _veh) select 0; private _textures = (_this select 6); private _phaseData = (_this select 7); { _veh setObjectTextureGlobal [_forEachIndex, _x]; } forEach _textures; { _veh animate [_x, (_phaseData select _forEachIndex)]; } forEach (animationNames _veh); _veh; };
  8. PixeL_GaMMa

    vehicle randomization data

    OK just put these together, not tested since my game mode doesn't use them directly like this, but they should work Source // // PX_fnc_getVehicleState :: Get vehicles current state - Note: this does not save inventory // Author: Colin J.D. Stewart // Usage: _stateblock = _vehicle call PX_fnc_getVehicleState; // PX_fnc_getVehicleState = { [ typeOf _this, getPosATL _this, getDir _this, fuel _this, getMass _this, damage _this, getObjectTextures _this, animationnames _this apply {_this animationPhase _x} // thanks Grumpy Old Man here for help ]; }; // // PX_fnc_createVehicle :: Creates a vehicle from state array block via PX_fnc_getVehicleState // Author: Colin J.D. Stewart // Usage: _stateblock spawn PX_fnc_createVehicle; // PX_fnc_createVehicle = { private _veh = createVehicle [_this select 0, _this select 1, [], 0, "FORM"]; _veh enableSimulationGlobal true; _veh setVariable ["BIS_enableRandomization", false]; _veh setDir _this select 2; _veh setFuel _this select 3; _veh setMass _this select 4; _veh setDamage _this select 5; private _textures = _this select 6; private _phaseData = _this select 7; { _veh setObjectTextureGlobal [_forEachIndex, _x]; } forEach _textures; { _veh animate [_x, (_phaseData select _forEachIndex)]; } forEach (animationNames _veh); _veh; }; There are probably many improvements could be made here, but it's a start :) Best Regards, Colin
  9. PixeL_GaMMa

    vehicle randomization data

    Yep, but when the vehicle is saved (persistently) I can just do a getMass _veh; save this and when the vehicle is loaded, apply the animation data and then setMass ... etc Edit: Implemented and tested, along with getObjectTextures, it all works perfectly, thanks again for help, I will post the functions soon :)
  10. PixeL_GaMMa

    vehicle randomization data

    Yep, ideally it would be a single seed for a vehicle, how i do it in some of my procedural projects is have a seed that can be re-used. When the vehicle is generated, it is generated using a specific random seed/number, then if that seed is used again it would be generated in the exact same way, in which case it would be as simple as saving a single number and re-using it when calling createVehicle, that would have been perfect. Your code actually may be ideal, I can also just store a total of the mass rather than iterate the missing pieces. I assume the centre of mass also changes depending on this? Thanks for your help :) p.s. I already wrote a setCargoLoadout and getCargoLoadout which is ideal for vehicles and cargo boxes, I will release it once I make some improvements probably. :)
  11. Hi there, is it possible to grab the current vehicle seed of a randomized vehicle and load up that vehicle again? e.g. If i create a pickup truck and it randomizes it without 1 of the doors, is it possible to grab the state of that vehicle and re-load it at a later time? I already have persistence for vehicles, but it only stores damage level and class of the vehicle, but I would also like to store the current state/randomized version of that vehicle. -Colin
  12. Yep I'm thinking about using InventoryClosed which can then remote call server side function (assuming, it is the correct type of container) ... probably this will be fine. Thanks again.
  13. The problem with this is containers are dynamic and can be 100s, so to add event handler to all containers on all clients would be too much, I will try to come up with an alternative method. Thanks for help.
  14. ok thanks will do some tests.
  15. Will this still work if the event is assigned from the server? (wiki says it is global)
×