Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20

Thread: Flood effect

  1. #11
    Quote Originally Posted by zooloo75 View Post
    Code:
    waituntil {alive player};
    
    hint "Flooding!";
    flood1 = "pond_acr" createvehicle (getpos loc1); flood1 setpos [position flood1 select 0, position flood1 select 1, -1];
    
    while {true} do {if(position flood1 select 2 < 500) then 
    {
    
    flood1 setpos [position flood1 
    select 0, position flood1 select 1, (position flood1 select 2) + .02]; hintsilent format["Flood Height: %1",(position 
    flood1 select 2)];sleep 1;};
    
    };

    Here. This will make a flood at an object named "loc1", and it will give you a hint on the height the flood is at.

    I have a question though. How do I script a radius around a position? That way I can script in locations around a circumference of an object, while expanding the radius to make a bomb effect.
    If you're using a trigger you can do:

    _areaX = (triggerArea testTrigger) select 0;
    _areaY = (triggerArea testTrigger) select 1;

    Or if it's a marker...

    _areaX = (getMarkerSize "testMarker") select 0;
    _areaY = (getMarkerSize "testMarker") select 1;

    You can also look over the code BIS uses to create the flood on their mission: 'There will be flood' with the link I provided.
    I love a good apocalypse, I just want to watch the world burn with coffee in my hand.
    (A3) Ammo Crate Filler | (A3) Virtual Ammobox System (VAS) | (A3) TAW View Distance Script | (A3-MP) TAW Respawn Confirmation | (A2OA) [TVT/CO-55] Wasteland | (A2OA-A3)MP Fast Time & JIP Compatible
    so so called Internet Expert/Senzation Attention/Panic Maker

  2. #12
    Where is Feint and his Diving Under Water when we need him!!!!

    Water world on Takistan

    found that link in the Czech Republic DLC thread
    Last edited by panther42; Aug 2 2012 at 19:33.

  3. #13
    Did some messing around with ponds; maybe some will find this useful.

    Creates ponds in an area:
    PHP Code:
    private ["_aslHeight","_pond","_yPos","_xPos","_pondSize","_ponds","_centerPosASL","_size","_pondClass","_waterHeightASL","_lenTiles"];

    _pondSize 52;

    _centerPosASL _this select 0;
    if (
    typeName _centerPosASL == "OBJECT"then _centerPosASL getPosASL _centerPosASL; };
    _size _this select 1;
    _aslHeight = if (count _this 2then {_this select 2} else {0.4};

    _ponds = [];
    _waterHeightASL = (_centerPosASL select 2) + _aslHeight;
    _lenTiles ceil ((_size) / _pondSize);
    _ponds resize (_lenTiles _lenTiles);
    _pondClass "pond_ACR";

    _xPos = (_centerPosASL select 0) - (_lenTiles _pondSize) / 2;
    for 
    "_i" from 0 to (_lenTiles-1) do {
        
    _yPos = (_centerPosASL select 1) - (_lenTiles _pondSize) / 2;
        for 
    "_j" from 0 to (_lenTiles-1) do {
            
    _pond createVehicle [_pondClass, [0,0,0], [], 0"NO_COLLIDE"];
            
    _pond setDir 0;
            
    _pond setPosASL [_xPos_yPos_waterHeightASL];
            
    _yPos _yPos _pondSize;
            
    //hint str (_i * _lenTiles + _j);
            
    _ponds set [_i _lenTiles _j_pond];
        };
        
    _xPos _xPos _pondSize;
    };

    _ponds 
    Raises or lowers ponds over time:
    PHP Code:
    private ["_pondPos","_forEachIndex","_rise","_totalTime","_interval","_ponds","_steps","_risePerStep","_newPositions"];

    _ponds _this select 0//Ponds to manage
    _rise _this select 1;   //How many m to rise [meters]
    _totalTime _this select 2;  //How long time to take to do it [seconds]

    //Find interval - 0.015M per change is nice
    _interval 0.015 / (_rise _totalTime);

    //But never more than twice per seconds
    _interval _interval max 0.5;

    _steps _totalTime _interval;
    _risePerStep _rise _steps;

    _newPositions = [];
    _newPositions resize (count _ponds);

    //Fill x, y, positions
    {
        
    _pondPos getPosASL _x;
        
    _newPositions set [_forEachIndex, [_pondPos select 0_pondPos select 1_pondPos select 2]];
    } forEach 
    _ponds;

    for 
    "_i" from 0 to _steps do {
        
    //Raise all positions
        
    {
            
    _x set [2, (_x select 2) + _risePerStep];
        } forEach 
    _newPositions;
        
    //Repos ponds
        
    {
            
    _x setPosASL (_newPositions select _forEachIndex);
        } forEach 
    _ponds;

        
    sleep _interval;
    }; 
    EDIT - Added example:

    Let's call the first file createPonds.sqf and the other raisePonds.sqf. Then how you could use them:
    PHP Code:
    //Create ponds centered on someObject that covers a square 500x500M (minimum, size ponds are 52x52 it will actually be 520x520m) and 0.4m above ground (measured at someObjects height).
    ponds = [someObject5000.4call compile preProcessFile "createPonds.sqf";
    //Now to flood the area: will raise the flood 5m over a period of  600s = 10min roughly.
    [ponds510*60execVM "raisePonds.sqf"
    Last edited by Muzzleflash; Aug 3 2012 at 01:13.

  4. #14
    mhhhhhh creating rivers? any one? Takistan, zagrabad? or other maps, new maps with rivers in them. maybe the time of making rivers with the ocean is over.
    Heavy weapons are silent weapons

  5. #15
    Posting in an epic thread.

    Parts of this should be stickied or added to the wiki or something! Thanks to the explorers who are sharing their code!

  6. #16
    Nevermind, incorrect editing post posting.

  7. #17
    Quote Originally Posted by h34dup View Post
    Posting in an epic thread.

    Parts of this should be stickied or added to the wiki or something! Thanks to the explorers who are sharing their code!

    Definitely an epic thread.
    Dynamic Zombie Sandbox - V1.25 released! - HERE

    My Twitter = Here|I'm "Craig" ingame!| http://www.dynamiczombiesandbox.com

  8. #18
    Making rivers should be possible, maybe even water falls with the setvector commands or pitches. This is something BIS did well!

    They should make a module that floods an area given the parameters of the area, and height.

  9. #19
    This still suffers some problems though. It is totally possible to walk under the water for hours, to shoot, even.

  10. #20
    Quote Originally Posted by BlackMamb View Post
    This still suffers some problems though. It is totally possible to walk under the water for hours, to shoot, even.
    Go Navy SEALS!

Page 2 of 2 FirstFirst 12

Similar Threads

  1. New Ocean Island... Flood
    By Pappy Boyington in forum ADDONS & MODS: COMPLETE
    Replies: 101
    Last Post: Sep 24 2005, 15:02
  2. UDP Flood to Host
    By subx in forum TROUBLESHOOTING
    Replies: 2
    Last Post: Sep 14 2004, 12:59
  3. Another flood disaster
    By RalphWiggum in forum OFFTOPIC
    Replies: 3
    Last Post: Sep 2 2002, 07:43
  4. Flood chaos hits prague
    By VXR in forum OFFTOPIC
    Replies: 2
    Last Post: Aug 13 2002, 15:23
  5. Bad Bug with Flood & Tide
    By SyN0 in forum TROUBLESHOOTING
    Replies: 8
    Last Post: Dec 21 2001, 01:12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •