Jump to content

peppy

Member
  • Content Count

    91
  • Joined

  • Last visited

  • Medals

Posts posted by peppy


  1. I am using !isnull to see if a helo is there, and if it is I want to delete it and its crew.

    I am using:

    "(!isNull(Helo1)) then {deleteVehicle(Helo1);};"

    It says it can be used on groups as well so I tryed"

    "if (!isNull(Man1)) then {deleteVehicle(Man1);};"

    Man1 is the group name, not the unit name.

    But I see the guys falling to ther death! lol.. help?

    ---------- Post added at 09:27 PM ---------- Previous post was at 09:26 PM ----------

    I know a loop with Crew would work well, but not sure how to form it.

    ---------- Post added at 09:32 PM ---------- Previous post was at 09:27 PM ----------

    ANSWER here..

    http://forums.bistudio.com/showthread.php?t=83280&highlight=deleting+crew


  2. _trg1=createTrigger["TigLigOFF",getPos player];
    _trg1 setTriggerArea[5,5,0,false];
    _trg1 setTriggerActivation["ALPHA","PRESENT",true];
    _trg1 setTriggerStatements["this", "SokPi1 setBehaviour 'COMBAT'"]; 
    _trg1 setTriggerText "Spooky Lights Off!";
    [/Code]
    
    Says Error 2 elements provided, 3 expected.
    [code]
    _trg1=createTrigger["SWITCH",getPos player];
    _trg1 setTriggerArea[5,5,0,false];
    _trg1 setTriggerActivation["ALPHA", "PRESENT",true];
    _trg1 setTriggerStatements["this", "SokPi1 setBehaviour 'COMBAT'",""]; 
    //_trg1 setTriggerText "Spooky Lights Off!";
    

    was trying both, but no go, comfused about "'s I am guessing. any help?

    ---------- Post added at 02:31 AM ---------- Previous post was at 01:18 AM ----------

    I just keep getting errors no matter how I change it up?!


  3. I have ran in to a bit of a snag, this has worked wonders for me, how ever I am confused on how to check and delete any created Markers, Way points or what have you.

    Basically this is a Recycle script that Cleans all the Variables, and removes all script created objects.

    This is what it looks like:


    caller = _this select 0;
    _WpGrp = group Spook;

    caller removeaction menu;
    caller removeaction Men1;
    caller removeaction Men2;
    caller removeaction Men3;
    caller removeaction Men4;
    caller removeaction Men5;
    caller removeaction Men6;

    caller removeaction Menex1;
    caller removeaction Menex2;
    caller removeaction Menex3;
    caller removeaction Menex4;
    caller removeaction Menex5;


    if (!isNull(SpokLz)) then {deleteVehicle(SpokLz);};
    if (!isNull(_Spokmok0)) then {deleteVehicle(_Spokmok0);};
    if (!isNull(_Spokmok1)) then {deleteVehicle(_Spokmok1);};
    if (!isNull(_Spokmok2)) then {deleteVehicle(_Spokmok2);};
    if (!isNull(_Spokmok3)) then {deleteVehicle(_Spokmok3);};
    if (!isNull(_Spokmok4)) then {deleteVehicle(_Spokmok4);};
    if (!isNull(_Spokmok5)) then {deleteVehicle(_Spokmok5);};
    if (!isNull(_Spokmok6)) then {deleteVehicle(_Spokmok6);};
    if (!isNull(_Spokmok7)) then {deleteVehicle(_Spokmok7);};

    if (!isNull(_ReconMapPos)) then {deleteMarker _ReconMapPos;};
    if (!isNull(_ReconStartM)) then {deleteMarker _ReconStartM;};
    if (!isNull(_ReconEndM)) then {deleteMarker _ReconEndM;};

    if (!isNull(_waypoint1)) then {deleteWaypoint [_WpGrp, 1];};
    if (!isNull(_waypoint2)) then {deleteWaypoint [_WpGrp, 2];};
    if (!isNull(_waypoint3)) then {deleteWaypoint [_WpGrp, 3];};


    _WpGrp = group _grpNull;
    _WpPos = 0;
    GetClick = true;

    exit;
    [/Code]


  4. this helo is not created by script.

    I my have forgoten to mention that Turing the lights on or off, is in an action.

    Menex2 = _caller addAction ["Lights OFF!!", "lights.sqf", [1],1];

    Menex1 = _caller addAction ["Lights On!!", "lights.sqf", [2],1];

    but once I select one of the actions the host script seems to stop, for example there sent to a wp that is created by the host script, but while there on their way to the WP and I use one of the actions (Witch looks at "lights.sqf" that is out side the host script), the helo will continue to move to the WP, but it will not land?

    If I don’t use the actions that helo lands as normal?

    I don’t know if it is possible, but is there a way to add code to an addiction, for example.

    Menex1 = _caller addAction ["Lights On!!", SokPi1 setBehaviour "COMBAT"];

    Or something of the kind?

    ---------- Post added at 03:46 AM ---------- Previous post was at 03:32 AM ----------

    I dont know enuff about fucntions to make it a fuction witch I would love to do, as it could be called by all scripts, witch it will have to do eventualy. any one willing to help, I will post the script and you can take a look at it. thanks.


  5. Thanks man! Appreciate the help.

    Okay having an issue, I need to be able to send orders to the helo while it is performing actions without interrupting the action.

    For example : Helo is order to move to WP1, where at WP1 it is to land, However I would like to be able to turn the lights on or off during its flight and landing without causing it to stop and hover, I am understanding it as.

    I wonder is there a way to run a script without interrupting the currently running script?

    It works good untill I effect the lights, then it just refuses to land, if I dont effect the lights, it lands, I am using the Behavour settings to effect the lights.

    PS: was reading on Spawn, is this what I could be using, as it can run parallel?


  6. http://forums.bistudio.com/showthread.php?t=107419&highlight=moveInTurret

    Is what I was reading as a reference.

    But I do have an additional question: If I spawn a Helo and Pilot in one script, then call an different script, how can I pass their names or groups names to be used in other scripts. Am I making them global?

    Example would be very cool, so I guess I am looking to Name the helo and the spawned units where each would have their own unique name, but one that can be used in any of the other scripts. Thanks. lol sorry new to the Spawning thing. :)

    got it. sorry nm.


  7. ya roger that, I am trying to keep each AI in its own grp for now, I am going to be running individual scripts on each, so I think it easier to just have each in its own group. Eventually in the script each has its own action, for example in case of a crash, or landing, each will respond differently, each will have their own set of commands and actions.

    And the Bis func, I know of, not about. I have intention on finding alternatives once I have a easy to understand and functional script, at the moment that is all I seek, functionality, and then I will concentrate on cleaning it up with function use, and loops to limit the scripting space, and time to run em.

    Thanks for the input, tis welcome..


  8. _heli1 = createVehicle ["MH60S",[_CalPosx, _CalPosy], [], 0, "FLY"];
    _heli1 setVehicleVarName "heli1";
    _heli1 engineon true;
    _heli1 Flyinheight 22;
    
    _heli1Pi1 = createGroup (west);
    "USMC_Soldier_Pilot" createUnit [Position _heli1,_SokPi1];
    (units _heli1Pi1 select 0) moveInDriver _heli1;
    
    _heli1Pi2 = createGroup (west);
    "USMC_Soldier_Pilot" createUnit [Position _heli1, _heli1Pi2];
    (units _heli1Pi2 select 0) moveInCargo [_heli1, 0];
    
    _heli1Gn1 = createGroup (west);
    "FR_AR" createUnit [Position _heli1, _heli1Gn1];
     (units _heli1Gn1 select 0) moveInTurret [_heli1 ,[0]];
    
    _heli1Gn2 = createGroup (west);
    "FR_AR" createUnit [Position _heli1, _heli1Gn2];
     (units _heli1Gn2 select 0) moveInTurret [_heli1 ,[1]];
    
    

    Not Seeing it, Gn1 and 2 are not getting placed in helo1, Pi1 and Pi2 are good. ??

    PS: I dont get it, it would not work, but it is now..? any reason why they may not be placed in there, script placement?


  9. What exactly is this? Is it a support script? Can you make a quick sample mission?

    At the moment no, I am working ondeveloping the scripts, what you see above is what it is going to do.

    The Spooky’s

    The script package is developed to add a Special response and support unit.

    The user has the ability to request a number of different resources from this one unit, such as Transportation, supplies and personal, as well as a Fast response medical team.

    The difference from the Spooky’s vs. other support units is that this script will allow complete interaction with the Spooky unit, and its available resources.

    The user can request transportation drop offs, personal drop offs, Taxi services, Medical services, and ammunitions resupply, as well as other things like air recon of a selected area, air support at selected area, and much, much more.

    The user is issued many other options not included here, for example if at night the user has the ability to request that the spooky “Smoke†or “Light†the selected aria.

    There are so many possibility’s that it is best to keep track of upcoming developments and it is at this time under construction. I am looking for any and all assistance, as you may have noticed this is not a small project and requires a lot of time to accomplish.

    I will do my best to provide answers to questions, but I am actually building scripts at this time, so giving any real answers is not actually possible as new options will become available as it develops further.

    Special Features:

    • Report of targets & Map painting.
    • Modified equipment (no Add ‘on needed)
    • Special AI scripting, such as Semi-Auto, and auto units (w. a advanced Response AI)
    • Specialized tactics (top secret at this time – AI use football type movements while engaging.)
    • Specialized weaponry (Direction Sound, and Lights that render the observer unconscious)
    • Special Top Secret (psychological war fare TOP SECRET!) not included in any write ups.

    Sorry as I mentioned it is currently under development. So no demos as of yet, unless you would like a demo of the first level menu system, that is complete.

    ---------- Post added at 05:10 PM ---------- Previous post was at 05:05 PM ----------

    I am looking for any SCRIPTERS new and old who would like to contribute some of their time and efforts to this project as it is rather large. I my self an old time scripter that has not been in this scripting scene for some time, I am some what rusty on the scripting lingo, so having to recover old knowledge and develop at the same time is some what challenging if you could imagine.

    So any one intrest please drop a Say so here, or Email Peppy.Zolk@shaw.ca.

    Of course contruibuter are given aknowlagement.

    Thanks all.


  10. I thought I would take the time to put down what I intend on doing with this script, so here it is.
    This Script will be available to players as a Module once it is complete.
    
    Elements include:
    One Chalk MH-60s with a crew of four.
    Chalk Guard Team, a Team of four solders each Independent of Each other and the Chalk.
    
    Medic Team, a Team consisting of one medic, and his Backup.
    A fast Action Team Independent but grouped.
    
    Available Mission Types:
    Transportation of Ammunitions.
    Transpiration of Reinforcements.
    Medical Service.
    Air Recon Services.
    Hot Extraction. (When Selecting, Chalk Land! & Chunk Bug – Out!
    
    Available Basic Chalk Controls: via menu & Radio
    Chalk Deploys Spook (Top Secret at the moment! – Not included yet..)
    Chalk Moves to Players Selected location. (See Notes)
    
    Chalk Land My Location.
    	Land At My location
    		Danger Close! Land!
    		Safe & Clear! Land!
    Land at Map Location
    		Danger Close! Land!
    		Safe & Clear! Land!
    Land!
    
    Chalk Air Recon & Land.
    Recon Start & End
    	At My Position
    	At Map Position
    
    Chalk Provide Support.
    Ammunition & Personal
    	Ammunitions
    	Personal
    		Four men
    		Two men
    	Ammunition & Personal
    Equipment Transportation
    	Empty Transport
    	Transport with Personal
    	Transport with Personal & Ammo
    Medical Services
    	Medics Manual
    	Medics Semi-Auto
    	Medics Auto
    
    Chalk Hover.
    Set Hover Height
    	At My Position
    	At Map Position
    	Hover 10.
    	Auto Hover 
    
    Chalk Bug Out!.
    Chalk Bug Out 10
    Chalk Bug Out 20
    Chalk Bug Out!
                             To Map Location
    
    Addition options: See Special.
    

    All Advanced options: Special.

    Chalk Moves to player or map location and adds radio communications that include the following.
    
    Chalk Land my Location.
    Sub-Command = Land at My location
    	Sub-Command = Danger Close! Land!
    		-Chalk will Land lights off, and hot.
    	Sub-Command = Safe & Clear! Land!
    		-Chalk will land Normal.
    Sub-Command = Land at Map Location
    	Sub-Command = Danger Close! Land!
    		-Chalk will Land lights off, and hot.
    	Sub-Command = Safe & Clear! Land!
    		-Chalk will land Normal.
    Sub-Command = Land.
    	-Chalk will land immediately.
    
    Chalk Air Recon & Land. 
    Sub-command = Recon Start & End.
    		-Player will define the radius of the chalks circle by selecting two points on the map, one the start, or center, and two the end, the Distance between Start and End is the outer radius, given it is not less the 100.
    	Sub-Command = At My Pos.
    		-Chalk will Recon 100m default or player defined radius above players location.
    	Sub-Command = At Map Pos.
    		-Chalk will Recon 100m default or player defined radius at players selected map location.
    Chalk Provide Support.
    Sub-Command = Ammunition & Personal. 
    	Sub-Command = Ammunitions.
    		-Chalk will land leaving an Ammunitions crate behind.
    Sub-Command = Personal. * (See Special.)
    	Sub-Command = Four Man.
    		-Chalk will deliver a four man team. (Default  .Hpp file) 
    	Sub-Command = Two Man.
    		-Chalk will deliver a two man team. (Default  .Hpp file)
    	Sub-Command = Ammunition & Personal. 
    		-Chalk will deliver the (default) team, and ammunitions crate.
    Sub-Command = Equipment Transportation. 
    	Sub-Command = Empty Transport.
    		-Provides Predefined Vehicles or Available vehicles. (via .hpp file.)
    	Sub-Command = Transport with Personal.
    		-Same as above but Delivers Default Crew for Vehicle Type.
    	Sub-Command = Transport with Personal & Ammo.
    		-Same as above but Vehicle has modified ammo and weapons aboard.
    
    Sub-Command = Medical Services * (See Special.)
    Sub-Command = Medics Manual.
    	-Medic Joins Players team for as long as there are wounded.
    Sub-Command = Medics Semi-Auto.
    	-Medic will be assigned a Team, where the player will control them externally.
    Sub-Command = Medics Auto.
    	-Medic automatically heals any wounded soldiers in players group. 
    
    Chalk Hover.
    Sub-Command = Hover At Set Height	
    		-Player will define the “height†of the chalks Hover by selecting two points on the map, one the start, and two the end,  the Distance between Start and End is the Height, given it is not less then 1.
    	Sub-Command = At My Position.
    		-Chalk will Hover at 20 (default) or Player defined height at players location.
    	Sub-Command = At Map Position.
    		-Player will define the position of the chalks hover by selecting a point on the map.
    Sub-Command = Chalk Hover 10.
    	-Chalk will drop to 10 at current location immediately (May crash if not clear).
    Sub-Command = Auto Hover.
    	-Leaves the Chalk hovering until give addition orders.
    Chalk Bug Out!
    Sub-Command = Chalk Bug Out 10
    	-Chalk will Move to Random Position for 10 min. 
    Sub-Command = Chalk Bug Out 20
    	-Chalk will Move to random Position for 20 min.
    Sub–Command = Chalk Bug Out!
    	-Chalk will return to base.
    
    Special [Personal]:
    
    Once Personal is on the ground and near the player the following options will be made available to the player.
    
    Team-Name Join My Team.
    	The Requested Team will join the players Team.
    Team-Name under My Orders.
    	The Requested Team will be assigned a Team under the player’s control.
    Team-Name Independent of Me.
    	The Requested Team will work under scripting that includes routines for.
    		Defend Players Team.
    			Ai Team will Follow Defend scripts when player has contact.
    	Cover and Stealth.
    		Ai Team will Cover when player team is not under fire but has contact.
    	Responsive action as per player’s action.
    		Stance.
    			Copy Stance Auto, Semi, or None. (via .hpp file.)
    		Formation.
    			Copy Formation, Independent, Situational. (via .hpp file.)
    		Combat Status.
    			Copy Combat, Full Combat, Auto Combat. (Via hpp. File.)
    		Behavior.
    			Copy Behavior, Auto Behavior, Situational Behavior. (via .hpp file.)
    		Position.	
    			Distance Far, Distance Mid, Distance Near, Independent (via .hpp file.)
    
    
    Special [Medics]:
    
    Once Medics are on the ground and near the player the following options will be made available to the player.
    
    Medic Join My Team.
    	The Requested Team will join the players Team.
    Medic under My Orders.
    	The Requested Team will be assigned a Team under the player’s control.
    Medic Independent of Me.
    	The Requested Medic will work under scripting that includes routines for.
    		Checking for injured on players team.
    		Move to and heal AI and player.
    		Semi Responsive action.
    		Automatic situational responses.
    		Board Chalk when no longer needed.
    

    The End!..

    Whooo. :j:

    Sorry if I have forgotten anything, work in progress but this is the intention. :)

    ---------- Post added at 06:41 AM ---------- Previous post was at 06:39 AM ----------

    PS: Menu Systems Complete.


  11. Although not the solution, I found attaching a trigger set to Detect Opfor worked well,but it is definitely not the way to go :).

    I don't want to use this script above, but I do want to understand how I can get a member of the same side, report contacts, as well as paint them for a shot time so any reports can be seen in the map view.

    I know it sounds complicated but I am sure there is a simple way of doing, I just don't know to string it all together.


  12. ya I was just looking in to that, I am not understanding how I can put it all together however.

    ---------- Post added at 11:27 PM ---------- Previous post was at 11:17 PM ----------

    I found this, but I am having a hard time understaning enuff to change it so it updates player about enemys.

    // Usage:

    // 1. add this script to your mission folder and call it at the beggining of "init.sqf" file, like that:

    // null = [] execVM "Awarness.sqf";

    //

    // 2. Add next row to the init field of the enemy groups leaders:

    // if (isNil ("afpEnemyGroups")) then {afpEnemyGroups=[]}; afpEnemyGroups = afpEnemyGroups + [group this];

    //

    // 3. Add next row to the init field of playable soldiers:

    // if (isNil ("afpPlayers")) then {afpPlayers=[]}; afpPlayers = afpPlayers + [this];

    if (isNil("afpEnemyGroups")) then { afpEnemyGroups = []; };

    if (isNil("afpPlayers")) then { afpPlayers = []; };

    if (!isServer) exitWith {};

    sleep 4;

    _playerIndex = 0;

    // check for groups awarness

    while {true} do

    {

    // don't need to update too often

    sleep 4;

    // first perform a fast check on groups to remove empty groups

    // not sure about this (deleting an item while in array), maybe create another array is better

    {

    if (isNull _x || count units _x <= 0) then

    {

    afpEnemyGroups = afpEnemyGroups - [_x];

    };

    } foreach afpEnemyGroups;

    sleep 0.01;

    // select a new player every cycle

    _player = afpPlayers select _playerIndex;

    _playerIndex = _playerIndex + 1;

    if (_playerIndex >= count afpPlayers) then { _playerIndex = 0};

    // share information among enemy groups

    _count = count afpEnemyGroups - 1;

    _index = 0;

    _ready = false;

    while {(_index < _count && !_ready)} do

    {

    sleep 0.001;

    if ((afpEnemyGroups select _index) knowsAbout _player > 1) then

    {

    {_x reveal _player } foreach afpEnemyGroups;

    _ready = true;

    };

    _index = _index + 1;

    };

    };

    // every 4 seconds a player is updated - 15 players / minute which is a decent speed

    // for most multiplayer games; for 50 players servers is fast enough because an enemy

    // group seeking for a player will self update knowsAbout for other players too


  13. I am trying to have a helo report any contact to the player, the helo is not part of the player’s team.

    I would like the helo to paint the contacts for as long as it is has contact. Only I have no Idea how to do this.

    I would like three things.

    a. That the helo will contact the player via a radio call, where it will mention the map grid of the contact

    b. That the contact has an icon placed over its last known position.

    c. That the Icon will fade after a short time if no longer noticed by the helo.

    Any help out there?

    Thanks.

×