Jump to content

Lucas Andreatta

Member
  • Content Count

    27
  • Joined

  • Last visited

  • Medals

Everything posted by Lucas Andreatta

  1. Hello, can anyone help me? I would like to do a mission of dominating the island using the "ALIVE", but would like a system that as you gain ground, is releasing new resources to buy armor, cars and units.
  2. Hello, I am creating an insurgency mission, I already have the script to make the AI drop intel, but I need another one to make Spawn ammo caches and another one for when to get the intel, go creating marks with the distances from the Cache. Intel script: 0 = [] spawn { if (isServer) then { while {true} do { { _unit = _x; if !(_unit getVariable ["hasIntelEVH",false]) then { _unit addEventHandler ["killed",{ params ["_unit"]; if (random 100 < ("droprate" call BIS_fnc_getParamValue) ) then { _suitcase = "Land_Suitcase_F" createVehicle (getpos _unit); [_suitcase,["Pick up INTEL", {params ["_suitcase","_caller","_id"]; hint "you have intel, clever one, you."; [_suitcase,_id] remoteExec ["removeAction"]; deleteVehicle _suitcase } ] ] remoteExec ["addAction",0,_suitcase]; }; }]; _unit setVariable ["hasIntelEVH",true]; }; } forEach (allUnits select {side _x == EAST}); sleep 10; }; }; };
  3. Lucas Andreatta

    Spawn ammo caches and marks

    Please :'(
  4. Lucas Andreatta

    Spawn ammo caches and marks

    Can someone CREATE this script for me?
  5. Lucas Andreatta

    Spawn ammo caches and marks

    But does bis_fnc_spawnGroup dynamically respawn AI? How does the spawn cache and markup script work?
  6. Lucas Andreatta

    Spawn ammo caches and marks

    alive is better
  7. Lucas Andreatta

    Spawn ammo caches and marks

    I'm going to use alive module systems to spawn AI
  8. Lucas Andreatta

    Spawn ammo caches and marks

    0 = [] spawn { if (isServer) then { while {true} do { { _unit = _x; if !(_unit getVariable ["hasIntelEVH",false]) then { _unit addEventHandler ["killed",{ params ["_unit"]; if (random 100 < ("droprate" call BIS_fnc_getParamValue) ) then { _suitcase = "Land_Suitcase_F" createVehicle (getpos _unit); [_suitcase,["Pick up INTEL", {params ["_suitcase","_caller","_id"]; hint "you have intel, clever one, you."; [_suitcase,_id] remoteExec ["removeAction"]; deleteVehicle _suitcase } ] ] remoteExec ["addAction",0,_suitcase]; }; }]; _unit setVariable ["hasIntelEVH",true]; }; } forEach (allUnits select {side _x == EAST}); sleep 10; }; }; }; the drop intel script, how i do?
  9. Lucas Andreatta

    Spawn ammo caches and marks

    In case the cache will spawn randomly in that area I mentioned above.
  10. Lucas Andreatta

    Spawn ammo caches and marks

    For example, takes 10 (ten) intels, marks on the map an ellipse with the cache position of 400x400. Grab another 10 intels, the ellipse turns from 300x300 and so on until you get 50x50 or smaller.
  11. Lucas Andreatta

    Spawn ammo caches and marks

    It could be inside an ellipse marker, but as it takes the intel, it has to be approaching the possible location of the cache. The goal is to stay dynamic to the point where the creator of the mission has no idea where the cache might be.
  12. Lucas Andreatta

    AI drop item

    I had an idea, every INTEL acquired, add 1 score. When you add (example) 5 score, it activates a trigger to spawn a possible cache area marker. A question: What causes more lag in the mission, scripts or triggers?
  13. Lucas Andreatta

    AI drop item

    Taking advantage of the post, I got a way to spawn caches without scripts, but as I do when I get INTEL, there will appear marks on the map approaching the location of the cache?
  14. Lucas Andreatta

    AI drop item

    Hell yeah, it worked !!! thank you so much!
  15. Lucas Andreatta

    AI drop item

  16. Lucas Andreatta

    AI drop item

    Many thanks for your patience. Is the params correct? class Params { class _dropRate { title = "Drop Rate"; // Param name visible in the list values[] = {10,20,30,40,50}; // Values; must be integers; has to have the same number of elements as 'texts' texts[] = {"10","20","30","40","50"}; // Description of each selectable item default = 20; // Default value; must be listed in 'values' array, otherwise 0 is used }; };
  17. Lucas Andreatta

    AI drop item

    Hell yeah, it worked !! Thank you so much guys. Where do I put the removeaction? Is he going to make the suitcase disappear? How do I make a drop rate (%) setting parameter?
  18. Lucas Andreatta

    AI drop item

    It did not work yet pierremgi ... I do not understand programming, I know the basics of eden editor, so I came to ask for help here :/
  19. Lucas Andreatta

    AI drop item

    I tried to replace "count (allUnits select {EAST});" by "forEach allUnits;" (just for testing) and gave this:
  20. Lucas Andreatta

    AI drop item

    Error
  21. Lucas Andreatta

    AI drop item

    FUS_fnc_moneyDrop = { _money = createVehicle ["Land_Laptop_unfolded_F", getPosATL (_this select 0), [], 0, "CAN_COLLIDE"]; _moneyId = _money addAction ["pick up the intel", {call FUS_fnc_moneyGrab;}]; }; FUS_fnc_moneyGrab = { deleteVehicle (_this select 0); hint "You've acquired some intel"; pMoney = pMoney + 100; }; { if (side _x isEqualTo EAST) then { _x addEventHandler ["Killed", {call FUS_fnc_moneyDrop;}]; }; } forEach allUnits; In another forum, they passed me this script. It worked, but it talks about money, I do not understand. My ultimate goal is to make AI drop intel to reveal the ammo cache.
  22. Lucas Andreatta

    AI drop item

    Yes, I copied a "suitcase" class from eden editor. This script dont work with ALIVE?
  23. Lucas Andreatta

    AI drop item

    { _x addEventHandler ["killed",{ (_this select 0) spawn { waitUntil {sleep 1; !alive _this}; if (floor random 10 > 8) then { _wh = "groundWeaponHolder" createVehicle (getpos _this); _wh addItemCargoGlobal ["Suitcase",1]; }; } }] } forEach (allUnits select {EAST}); It does not work, the AI does not drop anything. I was spawning via ALIVE, tried it manually and it also did not work. I put the code in init.sqf right?
×