Impavido
Member-
Content Count
249 -
Joined
-
Last visited
-
Medals
Everything posted by Impavido
-
I have a localized script on a MP client that will add weapons and ammo to the crate in front of the player. It adds the items to the crate and the player can see the items on the GEAR list, but they cannot pick the items up. Has anybody experienced this problem before?
-
Odd ammo crate problem.
Impavido replied to Impavido's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I just got it working with your suggestions Bon! The first problem was less so due to your code and more so due to me not using ' or "" inside the string for the setvehicleinit command. So a silly oversight on my part wasted your time. However I now have it working because of your help. Thank you very much Bon. -
Odd ammo crate problem.
Impavido replied to Impavido's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Thanks for the input Bon, but that does not appear to be working. The items stated in the setvehicelinit command do not appear at all. -
Odd ammo crate problem.
Impavido replied to Impavido's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
_box = nearestobject [player,"USSpecialWeaponsBox"] _box addweaponcargo ["M16A2",1]; _box addweaponcargo ["M16A2GL",1]; _box addweaponcargo ["M16A4",1]; _box addweaponcargo ["m16a4_acg",1]; _box addweaponcargo ["m16a4_acg_gl",1]; _box addweaponcargo ["m4a1",1]; _box addweaponcargo ["mp5a5",1]; _box addweaponcargo ["m4a1_aim",1]; _box addweaponcargo ["G36a",1]; _box addmagazinecargo ["30rnd_556x45_stanag",30]; _box addmagazinecargo ["30Rnd_556x45_G36",30]; _box addmagazinecargo ["30rnd_9x19_mp5",16]; _box addmagazinecargo ["1rnd_he_m203",16]; _box addmagazinecargo ["flarewhite_m203",6]; _box addmagazinecargo ["1Rnd_Smoke_M203",6]; I use the nearestobject command to compensate for the init of a newly placed box being only activated on the client of the player who built/placed it. -
should it be: onplayerconnected [] exec "JIP.sqf" or onplayerconnected "[] exec ""JIP.sqf"""
-
New WP being followed by AI Infantry but not vehicle?
Impavido posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
In-script, I create a group on the east team. I then spawn vehicles and add the crew. At the bottom of the script, I add waytpoints for the group that gets the position of a game logic named WHQLogic. (highlighted in RED) When I use a similar script to spawn infantry, they are created and follow the WP just fine. But if I spawn ARMOR, the vehicles just sit there with engines idle. What is the nature of this problem? :confused: _veh1 = createVehicle [_class, _start, [], 0, "none"]; ~.1 _veh2 = createVehicle [_class, _start2, [], 0, "none"]; ~.1 _gun1 = HQAtt1 createUnit ["RU_Soldier_Crew", _start, [], 0, "NONE"]; _drive1 = AQAtt1 createUnit ["RU_Soldier_Crew", _start, [], 0, "NONE"]; _comm1 = HQAtt1 createUnit ["RU_Soldier_Crew", _start, [], 0, "NONE"]; _gun1 assignAsgunner _veh1; _gun1 moveingunner _veh1; _comm1 assignascommander _veh1; _comm1 moveincommander _veh1; _drive1 assignAsdriver _veh1; _drive1 moveindriver _veh1; _gun1 addeventhandler ["killed", {_this exec "respawn\hidenow.sqs"}]; _drive1 addeventhandler ["killed", {_this exec "respawn\hidenow.sqs"}]; _comm1 addeventhandler ["killed", {_this exec "respawn\hidenow.sqs"}]; _gun2 = HQAtt1 createUnit ["RU_Soldier_Crew", _start, [], 0, "NONE"]; _drive2 = AQAtt1 createUnit ["RU_Soldier_Crew", _start, [], 0, "NONE"]; _comm2 = HQAtt1 createUnit ["RU_Soldier_Crew", _start, [], 0, "NONE"]; _gun2 assignAsgunner _veh2; _gun2 moveingunner _veh2; _comm2 assignascommander _veh2; _comm2 moveincommander _veh2; _drive2 assignAsdriver _veh2; _drive2 moveindriver _veh2; _gun2 addeventhandler ["killed", {_this exec "respawn\hidenow.sqs"}]; _drive2 addeventhandler ["killed", {_this exec "respawn\hidenow.sqs"}]; _comm2 addeventhandler ["killed", {_this exec "respawn\hidenow.sqs"}]; ~1 [color="Red"] _WHQ = (getpos WHQlogic) _AS1WP = HQAtt1 addwaypoint [_WHQ,50] _AS1WP setwaypointtype "SAD"[/color] -
New WP being followed by AI Infantry but not vehicle?
Impavido replied to Impavido's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
*Face Palm Lol. Thx JDog! :p -
New WP being followed by AI Infantry but not vehicle?
Impavido replied to Impavido's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I already have created the group using creategroup. I put that ~1 delay before the creation of the WP thinking it would help, but it didnt. -
Thanks for the clarification shk and whisper. ---------- Post added at 10:05 PM ---------- Previous post was at 09:51 PM ---------- Oh, and this is a minor detail evading me: JIP.sqf is run on the server automatically when a player connects?
-
Forgive my poor SQF syntax knowledge but I want to make sure I follow this part: The above code essentially defines JIP as a variable that becomes TRUE if the client is not the server and the player slot chosen is empty. Then the following part waits until the slot is filled. Am I correct in this?
-
I've added the eventhandler as suggested above, and am using the script below: _unit = _this select 0; //the killed unit _weapons=weapons _unit; //get weapons _magazines=magazines _unit; //get mags waituntil {alive _unit}; //waits for the unit to respawn (is alive again) removeallitems _unit; removeallweapons _unit; {_unit addweapon _x;}foreach _weapons; //add weapons {_unit addmagazine _x;}foreach _magazines; //add magazines The player does not respawn with their pre-death weapons. What am I missing?
-
A MP script host client woe...
Impavido replied to daza's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
OK, thx Galzohar!! -
I am attempting to make a JIP.sqf, and this is both the first time I've trie to use one AND I am very fuzzy on sqf format. I have tried to adapt Xeno's example to my own needs. I have a map in which each player receives a score as the game proceeds. I would like that score to be reset to 10000 when they JIP. Will this butcher-job syntax work? i_am_a_server = false; i_am_a_client = false; player_initialized = false; if (player==General) then { Wgencash=10000; publicvariable "Wgencash"; }; }; } else { // I'm a client but the player object may not be initialized yet i_am_a_client = true; [] spawn { waitUntil {!isNull player}; player_initialized = true; }; }; if (player==WENG) then { WENGcash=10000; publicvariable "Wengcash"; }; }; } else { // I'm a client but the player object may not be initialized yet i_am_a_client = true; [] spawn { waitUntil {!isNull player}; player_initialized = true; }; }; if (player==pilot1) then { WPIL1cash=10000; publicvariable "Wpil1cash"; }; }; } else { // I'm a client but the player object may not be initialized yet i_am_a_client = true; [] spawn { waitUntil {!isNull player}; player_initialized = true; }; }; if (player==w1) then { W1cash=10000; publicvariable "W1cash"; }; }; } else { // I'm a client but the player object may not be initialized yet i_am_a_client = true; [] spawn { waitUntil {!isNull player}; player_initialized = true; }; };
-
A MP script host client woe...
Impavido replied to daza's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
What syntax would I use for SetVehicleInit if the string has a string in it? Would it be: unit setVehicleInit "[unit] exec "nameofscript.sqs"" ?? -
Is there a way to detect and delete an artillery or mortar shell? Is it similar syntax as the vehicle class names etc, so "deletevehicle" will work on it? What I would like to do is deny the player from firing on a certain area.
-
Comms and Custom menues
Impavido replied to dfear's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Thanks very much for the example dfear! -
Restarting A Module
Impavido replied to Smoot178's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I have tried multiple variations of the Synchronizeobjectsadd command to re-enable a module for a respawned player, and it does not work AT ALL. -
Comms and Custom menues
Impavido replied to dfear's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I've trie dplacing the example from Gaia in a description.ext and it crashes the game. What am I doing wrong or what have I not properly defined. -
How to synchronize by trigger or script?
Impavido replied to splatsh's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Has this issue been corrected with 1.03. I've looked over the 1.03 notes and it doesn't appear so--unless I missed it. -
How to synchronize by trigger or script?
Impavido replied to splatsh's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I think we're gonna have to sit and wait until BIS addresses it. -
how to make c130 not playable??
Impavido replied to kiwi1234's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
put this in the init of the C-130. this lock true -
How to synchronize by trigger or script?
Impavido replied to splatsh's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I'm going to take the lazy route and hope that 1.03 addresses this problem. -
How to synchronize by trigger or script?
Impavido replied to splatsh's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I'm not really trying to create the module in-mission. It's already there. I'm juat trying to get the newly created squads/units to synch up with it so that the High COmmander can give them move orders. -
How to synchronize by trigger or script?
Impavido replied to splatsh's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Hmm. I've followed you suggestion, and the newly created unit is not synchronized with the subordinate module. Actially, the format text lists things that I never synched it with! Such as ammo crates, game logics, etc. I'm guessing we are going to have to wait until BIS updates Arma 2. I hope they address this issue. -
Activating script in init of objects thru COIN
Impavido posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I've struggled to create my own construction interface. The current model makes each created building start a script named IDENTIFY.SQS (highlighted) through it's init line. Identify will ID the type of building built, and assign a script or trigger to the building, depending on its type. It works offline, but I feel I am having some major locality issues online. For example, if one player builds a building, the init line only seems to be activated on his client. Is this an issue with COIN or something that is due an error of my own? Also, can IF or WHILE criteria be put into the construction SQF below? Such as IF this building is a INSERT NAME then DO THIS ACTION, etc? wgenbuild setvariable ["BIS_COIN_name","Base"]; build setvariable ["BIS_COIN_rules",[westplayer]]; build setvariable ["BIS_COIN_areasize",[50,20]]; build setvariable ["BIS_COIN_categories",["Base", "Defence", "Fortification"]]; build setvariable ["BIS_COIN_items", [ //--- Class, Category, Cost or [fundsID,Cost], (display name) ["USMC_WarfareBBarracks","Base",200,"USMC Barracks"], ["USMC_WarfareBLightFactory","Base",100,"Light Vehicle Factory"], ["USMC_WarfareBFieldhHospital","Base",100,"Field Hospital"], ["HeliH","Base",100,"Heli-Pad"], ["Land_telek1","Base",100,"Comm Tower"], ["Fort_Nest_M240","Defence",100], ["Land_fortified_nest_small","Fortification",100] ] ]; build setvariable ["BIS_COIN_funds",["westcash"]]; build setvariable ["BIS_COIN_fundsDescription",["€"]]; build setvariable ["BIS_COIN_onPurchase",{sleep 2,}]; [color="Red"]build setvariable ["BIS_COIN_onconstruct",{sleep 2; [(_this select 1)] exec "buildings\identify.sqs";}];[/color]