A-SUICIDAL
-
Content Count
520 -
Joined
-
Last visited
-
Medals
Posts posted by A-SUICIDAL
-
-
I think my guess was correct:
gamelogic
tower = (position this nearestobject 123256); tower allowDamage false;
I tried destroying the building and I could not.
-
What if I am trying to make it so the building cannot be destroyed. For instance the control tower at south air base in Takistan. I have a nonplayable AI commander that stand ins the glass room, but I don't want coop players or enemy destroying the building and leaving the commander standing in rubble, lol. It would be easier if I could just set the building to "this allowDamage false;". How would I do this?
---------- Post added at 08:00 PM ---------- Previous post was at 07:51 PM ----------
Do I add a gameLogic and set it to "objects" and put this in it's init field?
tower = (position this nearestobject 123256); tower allowDamage false;
The id number of the building was 123256. I'm guessing that I am way off.
-
I have an action added to a player to "Play Music" and then removes the action. What I would like to do is then add another action for "Stop Music". Basically the music is really a just a sound file using: playSound "track1";
I've tried the car radio addon, but I'm not really interested in all that, I just wanted to offer 1 sound file to be turned on or off when desired. I've searched a lot before asking for help here, but couldn't find anything to help me with this.
-
In my single player mission, if pilot ejects and is stranded I use norrins chopper extraction/taxi script. It gives me the action to call for an extraction chopper at missions start, but when I die and respawn it doesn't give me back the action. I've tried a zillion different ways to try to get it working correctly, but either I give up and just set it so if player abandons his vehicle, that 20 seconds later it destroys the plane and if plane is destroyed, it then destroys the player. For the 3 AI teammates, I already have it set this way, but for the player, I really wanted this chopper extract thing to work.
Here's the link for Norrin's taxi script:
http://www.armaholic.com/page.php?id=12141
If you know what I need to add to the bottom of the "SP_respawn.sqf" to get it to give me back the action to "Call for helicopter extraction" after I respawn, it would be greatly appreciated. It's the only thing left in the mission that I need to get working, then I'm done. Or I might just write my own script that spawns a chopper and crew and moves them to my position, lands etc. It would be much easier to get norrins script to work in this mission instead.
-
My friend is getting a message that says:
Cannot open object glt_missilebox\glt_aim120\glt_aim120.p3d
What is strange to me is... I made a mission and uploaded it to my server and included the addons needed in the zip as well. The mission worked fine for me and I was never aware that I needed @CBA enabled to use the F-16 and the Missilebox, and yet without @CBA enabled, everything worked fine for me, except the names of the missiles in the top right corner of my screen had full names, Like AMRAAM instead of AIM-120/C. But all the missiles worked fine, and left smoke trails and blew up enemy fighters, but then my friend joins using my exact addons enabled and he tells me he can't see or hear his AMRAAM's firing, but he could hear them blow up when he shot one at a hill. This is when I went back to armaholic and noticed that it said that CBA was required for the F-16, so I told him to enable CBA in his Arma 2 launcher and reconnect. Then he received a CBA version mismatch error. So we both downloaded and installed the latest CBA and we both enabled CBA in the Launcher and he receives the error shown above.
My friend is asleep right now, but I'm on teamviewer trying to fix the problem on his computer. I have his game open in a window mode right now, I've transferred my exact mod folders to his comp and enabled the required mods in his launcher and still this keeps occurring. The only thing left I can think of is maybe a computer restart, but if I restart his comp, I can't get reconnected on teamviewer, lol.
Any idea why he is getting this message?
---------- Post added at 02:20 AM ---------- Previous post was at 01:02 AM ----------
Again... I have teamviewer open and I made absolute certain that both computers have exactly the same mod folders installed and enabled to play the mission. I am running in window mode on both machines and I have both windows open side by side and at the main menu screen, both show that the same mods are loaded and the same version of the game is running. I tried hosting and made my friends computer connect to me and he gets the error:
Cannot open object glt_missilebox\glt_aim120\glt_aim120.p3d
Then I tried having his computer host and he gets the same message, yet I can join his game and I don't get any errors. This makes absolutely no sense to me. He is on a 64bit computer, besides that there really is no difference between our machines. Another friend joined and also got this same message, and he's on 32 bit Vista.
Why is this happening? I just wanna play this damn mission.
---------- Post added at 02:52 AM ---------- Previous post was at 02:20 AM ----------
I found the problem. His mods were loaded in a different order down the side of his screen than on my screen. Does this matter? Yes, it does matter when the F16 mod folder already had missilebox mod files in it that had the same file name as the files inside the other missilebox mod folder. Obviously the older files were loading after the new files. So I deleted the missilebox files that resided in the F16 mod folder on both computers since there is already another missilebox mod folder being loaded that has newer files. Obviously the F16 Mod download used to contain it's own missilebox files. I still don't know why his Arma 2 launcher loaded the mods in a different order than my Arma 2 launcher does, but right now I just don't care anymore, as long as this stuff is working.
-
Somebody asked me earlier how I got my XFire ingame to work for Arma 2 CO. I don't get xfire ingame. I use ventrilo to talk to friends, chat in the game with sidechat, or minimize quick to read an xfire message, but to record movies and upload to xfire, this is what you do...
record with Fraps and make Fraps to save the movies to "C:\ProgramData\Xfire\videos"
Once your are done recording, go "C:\Program Files\Xfire" and launch "xfencoder.exe" and the browse to the Fraps movie that you recorded and then hit the "Go!" button and it will convert it. Once it is done converting, you can then see the movie on your XFire list of movies that are ready to be uploaded. The best part about this method is... it allows you to upload movies much longer than 10 minutes in length. Normally xfire never lets you upload anything over 10 minutes long. I make good movies. When uploading the movie, choose either "Unknown" game as the title, or add Arrowhead to your list of games in XFire manually by browsing to the Arma 2 exe root directory.
Then go ahead and upload your movie to XFire.
For best result, record using Frap in "Full size" not half size, but set your game to 1024x768 at highest. This will lag you less when recording and give you decent quality.
Or - install and use "Wegame". www.wegame.com. Good site. Record with wegame and upload to their site, but if you are not a paid member, you can only upload half size movies, which is fine, because the quality is video quality is great. Here's a wegame sample movie of me playing my Ghost Recon Advanced Warfighter 2 Mod using new weapons, unsuppressed and flashlight attachments. It's a good movie. http://www.wegame.com/watch/graw2-operation-herrera-hardcore/
-
I just use keyboard and I freelook with mouse the entire time. All my keys are remapped. I use the 6 keys above the arrow keys for my movement. Basically I fly using only 3 fingers, lol, except for when I occasionally tap my "next target", "toggle weapons" & "gear up".
Here's a chopper mission I made for SP and MP where I use 100% freelook while flying.
http://www.xfire.com/video/47a2db/
I'm going to put the respawn in the SP version and release both as a CO download. The music is trigger in the mission for both the movies.
---------- Post added at 08:05 AM ---------- Previous post was at 07:42 AM ----------
That chopper movie is old, the latest version has enemy tanks and troops and stuff at each waypoint, but I also have a simple patrol version like in the movie, where you simply take out trucks and a few soldiers here and there. It's the mission I use when I help friends learn to fly and gun. I've also played the same mission where I was the gunner and the AI would do the flying, and wow, they are really good at flying low and lining up shots for me. Very impressive, but I prefer to fly. Another SP version where there are two choppers, one follows the other, and lots of placed enemy tanks, trucks and Troops and other stuff at each objective, Civilians, Animals, and Ambient Combat module.
-
Well, here's a movie I made of my "single player mission with respawn" thanks to Demonized. It's much easier to play it when I'm not recording, since recording lags me a little. Even my 3 AI teammates respawn and get back into their F-16's and continue to do battle against SU-33's. Anyway, check it out. Give it time to load.
-
I keep checking to see the new changes, so the errors I'm getting are probably just me making mistakes again. Damn AI pilots eject the moment their Falcon has a tiny scratch. I'm trying to check if they are not in the plane and over 200m away from the respawn area, then wait enough time for them to parachute to the ground so it looks cool, then setpos them back the the start, and setDamage them to 0. But I need to get the get in plane after respawn stuff working first.
---------- Post added at 02:14 AM ---------- Previous post was at 02:11 AM ----------
yeah I have a vehicle_respawn script. but it's just for if the plane is abandoned and if it's destroyed to respawn it immediately at base so the getIn commands work.
---------- Post added at 02:30 AM ---------- Previous post was at 02:14 AM ----------
The getIn stuff seems to be working better now. I started the mission, blew myself up with a pipebomb, respawned and the vehicle was still assigned to me, but he never told me to get in a second time and there was no mount symbol on the plane, but at least it wasn't locked like it was before, lol. I have it on default, because if I set it to be unlocked and a friends plays my mission and gets in the wrong plane, it will screw the AI up.
-
It gave me errors. hmm
-
Ok, got everything working perfect except for 1 thing, but that belongs in the other thread.
---------- Post added at 01:17 AM ---------- Previous post was at 01:16 AM ----------
damn, I just refreshed, typed 1 sentence, and already you replied before I could, lol.
---------- Post added at 01:18 AM ---------- Previous post was at 01:17 AM ----------
That looks better than my method of 8 triggers that check for when each of the 4 players are alive and when the 4 planes are alive and exec the script to make them get back in.
-
I'm trying to get these other 3 AI on my team to hop back into their planes when they respawn. It was working when I tested in MP with AI enabled - before your SP_respawn script, but in this single player version I'm making, it doesn't seem to be working. For instance assigning AI named "s3" to plane "p3" and ordering him to get in and head towards our only waypoint. Maybe I should tell them all to head towards a marker. The main player/me is "s4" and lowest in chain of command, but when I tested as player "s1" I lost command when I respawned. I'll keep trying to figure it out. As usually I'm probably doing something wrong. This idea for singleplayer respawn could be the beginning of a new era of awesome single player missions. Your the man!
-
When an AI on my team gets killed, it causes me to die instantly, lol. So I guess it wont work for them.
---------- Post added at 11:27 PM ---------- Previous post was at 11:20 PM ----------
Edit, lol. You script changed. Works now. This is awesome.
-
I'm so happy!
Thank you thank you thank you!
Dancing banana
-
Works nice. I love it. I'm trying to understand exactly what the script is doing. Is there a way to leave the player dead for a moment, fade to black, then have a 10 second timer over the blackness, then the player finds himself back at the SP_respawn marker?
---------- Post added at 09:22 PM ---------- Previous post was at 09:01 PM ----------
Like, maybe right after the player respawns do something like from Norrin's script:
if ((_respawnAtBaseWait select 1) != 0) then
{
_timer = (_respawnAtBaseWait select 1);
_name disableAI "anim";
_c = 1;
_name setCaptive true;
while {_timer >= 0} do
{
if (_c >= 1 ) then
{
if (_name == player) then
{
_timer_message = format ["You will respawn in %1 seconds", _timer];
titletext [_timer_message,"BLACK FADED", 0.3];
};
_timer = _timer - 1;
_c = 0;
};
sleep 0.05;
_c = _c + 0.05;
};
_name setCaptive false;
_name enableAI "anim";
};
[\code]
-
Yeah, I use "this allowDamage false;" all the time, but I actually want to die and respawn at base in this mission I'm trying to make. I am making it for singleplayer and multiplayer. My jet gets shot down, I die, the jet respawns and activates a script that unassigns me from vehicle, then reassigns me back to the vehicle and then I'm given the order to get back in. I want to play it single player with AI, this way we are all assigned to a vehicle. We die, respawn and get back in and keep fighting. In the multiplayer version, nobody is assigned to any vehicles. Normally, with Norrin's revive, the enemy die and respawn at the ralley point spawn location that I added, because it's the closest spawn point. I tried to shorten the spawn timer for the mission I'm working on now, but what's the point of using Norrin's revive script if I don't want to use any of the revive abilities in this 1 particular mission. Norrin somehow get's the players and AI to actually respawn, so it should be possible to create a more simplified script just for respawning in singleplayer. If I could borrow Norrin's brain for an hour, I would be writing the script right now, lol. The most I would need is to respawn with same weapons I started the mission with. Edit... Actually, we don't need any weapons, we got jets with rockets, heh.
---------- Post added at 06:35 PM ---------- Previous post was at 06:12 PM ----------
Honestly, out of all the scripts I've seen for this game, I can't believe that nobody has ever written a simple singleplayer respawn script.
I've been looking at the Norrin's "respawn.sqf" file trying to figure out how to remove all the stuff that I wouldn't need. So maybe when the player dies, it fades to black with a message saying "you will respawn at base in 10 seconds", leaves the player in somekind of captive state, then set's his position back to the "respawn_west" marker and then the black screen fades away and your back in the game.
This is Norrin's "respawn.sqf" file:
// respawn.sqf
// © JULY 2009 - norrin
_unit = _this select 0;
_respawn_position = NORRN_revive_array select 28;
_respawn_at_base_addWeapons = NORRN_revive_array select 11;
_respawn_at_base_magazines = NORRN_revive_array select 34;
_respawn_at_base_weapons = NORRN_revive_array select 35;
_respawnAtBaseWait = NORRN_revive_array select 68;
_no_respawn_points = NORRN_revive_array select 12;
_Base_1 = NORRN_revive_array select 13;
_Base_2 = NORRN_revive_array select 14;
_Base_3 = NORRN_revive_array select 15;
_Base_4 = NORRN_revive_array select 16;
_mobile_spawn = NORRN_revive_array select 51;
waitUntil{call compile format["!isNull %1",_unit]};
_name = call compile format["%1",_unit];
_unconscious_body = objNull;
_pos = [];
sleep 2;
_base_weps = [];
_base_mags = [];
if (_respawn_at_base_addWeapons == 1 && count _respawn_at_base_magazines == 0 && count _respawn_at_base_weapons == 0) then
{
_base_weps = weapons _name;
_base_mags = magazines _name;
};
hint "No revive";
while {true} do
{
waitUntil {local (call compile format["%1",_unit])};
_name = call compile format["%1",_unit];
waitUntil {!alive _name || !local _name};
if (local _name) then
{
if (_name == player) then {titletext["","BLACK FADED", 5]};
_pos = getPos _name;
_weps = weapons _name;
_mags = magazines _name;
waitUntil{alive call compile format["%1",_unit]};
_name = call compile format["%1",_unit];
// Give player weapon and mag loadout they had prior to dying
removeAllWeapons _name;
{_name removeMagazine _x} forEach magazines _name;
removeAllItems _name;
{_name addMagazine _x} forEach _mags;
{_name addWeapon _x} forEach _weps;
_name selectWeapon (primaryWeapon _name);
if (_respawn_position == 2 && isplayer _name || _respawn_position == 3 && isplayer _name) then
{
if (_mobile_spawn == 1) then
{
if (NORRN_camo_net) then
{
_no_respawn_points = NORRN_revive_array select 12;
_Base_1 = NORRN_revive_array select 13;
_Base_2 = NORRN_revive_array select 14;
_Base_3 = NORRN_revive_array select 15;
_Base_4 = NORRN_revive_array select 16;
}else{
_no_respawn_points = NORRN_revive_array select 12;
_no_respawn_points = _no_respawn_points - 1;
_Base_1 = NORRN_revive_array select 14;
_Base_2 = NORRN_revive_array select 15;
_Base_3 = NORRN_revive_array select 16;
};
};
closedialog 0;
if (_no_respawn_points == 1) then {_dialog_5 = createDialog "respawn_button_1map"};
if (_no_respawn_points == 2) then {_dialog_5 = createDialog "respawn_button_2map"};
if (_no_respawn_points == 3) then {_dialog_5 = createDialog "respawn_button_3map"};
if (_no_respawn_points == 4) then {_dialog_5 = createDialog "respawn_button_4map"};
if (_no_respawn_points > 0) then {ctrlSetText [1, _Base_1]};
if (_no_respawn_points > 1) then {ctrlSetText [2, _Base_2]};
if (_no_respawn_points > 2) then {ctrlSetText [3, _Base_3]};
if (_no_respawn_points > 3) then {ctrlSetText [4, _Base_4]};
};
if (_respawn_position == 1) then {_respawn_at_base = [_name, _pos] call Norrn_RespawnPos1};
// Unit respawns at chosen location if player
if (_respawn_position == 2 && isplayer _name || _respawn_position == 3 && isplayer _name) then {_respawn_at_base = [_unconscious_body] call Norrn_RespawnPos2};
// Unit respawns closest to leader if not player
if (_respawn_position == 2 && !isplayer _name || _respawn_position == 3 && !isplayer _name) then {_respawn_at_base = [_name, _pos] call Norrn_RespawnPos2AI};
if ((_respawnAtBaseWait select 1) != 0) then
{
_timer = (_respawnAtBaseWait select 1);
_name disableAI "anim";
_c = 1;
_name setCaptive true;
while {_timer >= 0} do
{
if (_c >= 1 ) then
{
if (_name == player) then
{
_timer_message = format ["You will respawn in %1 seconds", _timer];
titletext [_timer_message,"BLACK FADED", 0.3];
};
_timer = _timer - 1;
_c = 0;
};
sleep 0.05;
_c = _c + 0.05;
};
_name setCaptive false;
_name enableAI "anim";
};
// Add respawn at base weapons if this option is being used
if (_respawn_at_base_addWeapons == 1) then
{
// Added code for respawning at base with original mission load-out - 260409
if (count _respawn_at_base_magazines == 0 && count _respawn_at_base_weapons == 0) then
{
removeAllWeapons _name;
{_name removeMagazine _x} forEach magazines _name;
removeAllItems _name;
{_name addMagazine _x} forEach _base_mags;
{_name addWeapon _x} forEach _base_weps;
_name selectweapon primaryweapon _name;
} else {
removeAllWeapons _name;
{_name removeMagazine _x} forEach magazines _name;
removeAllItems _name;
{_name addMagazine _x} forEach _respawn_at_base_magazines;
{_name addWeapon _x} forEach _respawn_at_base_weapons;
_name selectweapon primaryweapon _name;
};
};
};
sleep 1;
};
-
I test new missions I work on and sometimes die and hate having to restart the mission from scratch, so I use norrins revive script in the mission and then it allows me to respawn in singleplayer. I once found a script that gave the ability to respawn in singleplayer missions without the need of any addons, but I never used it and now I can't find it anywhere. Does anybody know where I can find it? It was a very simple and short script. If I remember correctly, I think it used "this addEventHandler ["killed", blah blah blah..." in the players init. I can't remember much other than that.
There are a couple of singleplayer respawn downloads at armaholic.com, but they required an addon to be installed. I was hoping to avoid using an addon. Norrin's revive doesn't use any addons, and I've tried to figure out how to write my own simplified respawn script by analyzing how Norrin's script works, but I kinda gave up on that.
Well, if somebody knows how to do this, it would be very helpful.
-
Trying it now.
Oh, when I mentioned before...
I also created a trigger with radius 0, activation "NONE" with...condition:
Code:
vehicle player != player
on activation:
Code:
hint composeText [parsetext format["<t size=1.2' align='center' color='#FFA500'>Reminder%1</t><br/><br/><t size='0.9' align='center' color='#FFFFFF'>To rearm, repair, refuel and heal mid-air, simply fly less than 50m over the runway at your Air Base.%1</t>]];
Now when anybody hops in a fighter, they will get a reminder message telling them that they can low fly-by over the runway to service their vehicle and heal.
The part where I use "vehicle player != player" as the condition, this works, but if the get in a support truck or a jeep, it gives them the same message. So I changed the condition to:
vehicle player isKindOf "GLT_Falcon_lg_cap"
-
I experimented with each script. They all seem to work well.
ST_Dux, your script seemed the most simplified, but the player was not healing at all, so I tried changing it a little. I also decided to set the height to 50m and add a vehicleChat message with it.
condition: this
on activation:
{if ((getPosATL _x select 2) < 50) then {player setDamage 0;(vehicle _x) setDamage 0;(vehicle _x) setFuel 1;(vehicle _x) setVehicleAmmo 1}} forEach thisList; vehicle player vehicleChat "Your Fighter is eady..."
I also created a trigger with radius 0, activation "NONE" with...
condition:
vehicle player != player
on activation:
hint composeText [parsetext format["<t size='1.2' align='center' color='#FFA500'>Reminder%1</t><br/><br/><t size='0.9' align='center' color='#FFFFFF'>To rearm, repair, refuel and heal mid-air, simply fly less than 50m over the runway at your Air Base.%1</t>"]];
Now when anybody hops in a fighter, they will get a reminder message telling them that they can low fly-by over the runway to service their vehicle and heal.
---------- Post added at 02:49 PM ---------- Previous post was at 02:34 PM ----------
I use zeno's script in a few of my other missions, it works awesome. I also have a mission where I equipped a couple of littlebirds with 14 additional rockets, and the littlebirds use a vehicle respawn script that adds an additional 14 rockets when they respawn, but I also had to add tell zeno's script to add 14 additional rockets as well, because his script normally removes all weapons and the adds back the default amount. I also have a couple of Bradleys and a couple of Stryker MGS that have additional ammo too, so right at the near the bottom of Zeno's script, where it says "_object setFuel 1;" I then added these lines below it:
_object addMagazineTurret ["14RND_FFAR",[-1]]; //for Littlebird
_object addMagazineTurret ["2RND_TOW2",[0]]; // for Bradley
_object addMagazineTurret ["2RND_TOW2",[0]]; // for Bradley
_object addMagazineTurret ["2RND_TOW2",[0]]; // for Bradley
_object addMagazineTurret ["2RND_TOW2",[0]]; // for Bradley
_object addMagazineTurret ["210RND_25MM_M242_APDS",[0]]; // for Stryker MGS
_object addMagazineTurret ["210RND_25MM_M242_HEI",[0]]; // for Stryker MGS
This tries to add the weapons to any vehicle that uses the vehicle service trigger, but I figure it can't hurt because if the the vehicle can't use the added weapons, then it obviously can't equip them and fire them, lol. So it works well.
-
How would I put...
setDamage 0; //for player
setDamage 0; //for vehicle
setFuel 1; //for vehicle
setVehicleAmmo 1; //for vehicle
in a trigger and have it effect any player and their vehicle that enters the trigger? Or have it exec a script to to do the same?
Usually I use actions to do this stuff, but in this case, I just want it to instantly occur with out the need of performing an action.
-
Yeah I've used that. Thanks, but I don't think it will work in this case, since vehicle is still in the air moving fast.
-
I'm almost done making a coop jet flying mission, but I wanted to add a trigger covering the runway at our base that when players fly less than 30m over the runway - it will instantly repair, rearm and refuel the plane and also heal the player. Much like in Battlefield 2. I put this in another mission months ago, but it only rearmed the vehicle and the trigger failed to work after the player and vehicle respawned.
So far I have a trigger covering the runway, set to be activated by BLUFOR, repeatedly and this in the condition field:
this && {((getPosATL _x) select 2) < 30} count thislist > 0
Now I just need to figure out how to script things correctly for:
_unit setDamage 0;
_veh setDamage 0;
_veh setFuel 1;
_veh setVehicleAmmo 1;
...and make sure that it works for vehicles/players after they respawn.
Any help with this would be appreciated. It's not a bad idea for flying missions.
-
True.
---------- Post added at 12:55 AM ---------- Previous post was at 12:54 AM ----------
I want to make sure I am doing this correctly. I'm using Takistan map and we start out at the South Eastern Airstrip. I placed 6 markers spread out 3000m apart from each other to the north/north west outer area of the map and named them: "planeGrp1Start", "planeGrp2Start", "planeGrp3Start", "planeGrp4Start", "planeGrp5Start" and "planeGrp6Start". I Then placed 6 more markers spaced 1000m apart near the north/north west inner/center of the map where I want each group of 2 planes planes to patrol and named these markers "planeGrp1Patrol", "planeGrp2Patrol", "planeGrp3Patrol", "planeGrp4Patrol", "planeGrp5Patrol" and "planeGrp6Patrol". I then made 6 copies of the script and named the files "spawnPlaneGrp1.sqf", "spawnPlaneGrp2.sqf", "spawnPlaneGrp3.sqf", "spawnPlaneGrp4.sqf", "spawnPlaneGrp5.sqf" and "spawnPlaneGrp6.sqf". I also change the group names and start and patrol locations in each file, so for example "spawnPlaneGrp3.sqf" would look like this:
_null = [] spawn { waituntil {!isnil "bis_fnc_init"}; _type = "Su34"; _side = EAST; _pos = getMarkerPos "planeGrp3Start"; _dir = 180; _height = 500; _patrol = getMarkerPos "planeGrp3Patrol"; _range = 1000; _mainGrp = createGroup _side; while {true} do { _vehicles = []; _amount = 2; while {_amount != 0} do { _amount = _amount - 1; _leader = [[_pos select 0,_pos select 1, _height], _dir, _type, _side] call bis_fnc_spawnvehicle; _veh = _leader select 0; _grp = _leader select 2; (crew _veh) joinSilent _mainGrp; _veh flyInHeight _height; _vehicles = _vehicles + [_veh]; sleep 3; deleteGroup _grp; }; _patrol = [_mainGrp, _patrol, _range] call bis_fnc_taskPatrol; waitUntil {({canMove _x} count _vehicles) == 0}; sleep 10; }; };
I removed the script that was in red.
I then have a trigger at the end of the runway that is set to be activated by BLUFOR "once" with the condition "this", I named the trigger "spawnTrigger" and in the "on activation" field I have this:
_null = [] execVM "SpawnPlaneGrp1.sqf"; _null = [] execVM "SpawnPlaneGrp2.sqf"; _null = [] execVM "SpawnPlaneGrp3.sqf"; _null = [] execVM "SpawnPlaneGrp4.sqf"; _null = [] execVM "SpawnPlaneGrp5.sqf"; _null = [] execVM "SpawnPlaneGrp6.sqf";
Then I have another trigger that then deletes the first trigger 5 seconds later and put in the "on activation" field: "deleteVehicle spawnTrigger;" so the trigger cannot be reactivated by players that join later in the mission. I'm not sure if this is the best method, but it seems to work.
So, everything seems to be working correctly, but am I executing the vehicle group spawn scripts correctly in the trigger, and I'm also not sure if I need to rename some of the variables in each script file, for instance for "SpawnPlaneGrp3.sqf", should "_mainGrp = createGroup _side;" be changed to "_mainGrp3 = createGroup _side;"? What variables would need to be changed in each script file - if any? I just want this mission to be setup perfectly.
-
Damnit, I was just going to say that I accidentally must have deleted my probability 0 unit from the mission and added him back and everything now works fine, but you're so fast you beat me to it. lol
---------- Post added at 11:20 PM ---------- Previous post was at 10:35 PM ----------
In an Invasion 1944 mission I made, I had a trigger covering just the runway, that when players flew at a certain height over the trigger, it would rearm them, but when I tested it in coop multiplay, for some reason the trigger wouldn't work after players and their vehicles respawned. I never finished working on the mission, but I don't know how to go about fixing it so it works after respawning.
I want to do the same in this mission and be able to rearm, repair and refuel like players do in battlefield 2 when they fly over their runway or carrier. I figure it's the best method since some guys have a lot of trouble landing, plus I wanted to avoid having players cluttering the runway with their planes or crashing into each other etc, especially when others are trying to take off. A simple return to base runway low-flyby and you ready for more action. Maybe set the player damage to 0 too.
I think I used this as the condition:
this && {((getPosATL _x) select 2) < 30} count thislist > 0
I can't remember what I had for "on activation" for setFuel, setVehicleAmmo, setDamage etc. In any case, I need to figure out how to make it work for all players and make sure it works when they respawn.
Single Player - respawn [script]
in ARMA 2 & OA : MISSIONS - Editing & Scripting
Posted · Edited by A-SUICIDAL
Your new version of you script works great. I love it, especially all the new options. You thought of everything. Amazing work. Your a genius dude.
I started on a new mission design, and everything is working great with the latest version of your script. I also have an older version of your SP_respawn working in a another mission I made and I wanted to update it, so I made a back up of my mission, then went ahead and tried updating the mission with the newer version of your script. I updated the SP_respawn.sqf file, the player init and also updated the marker to "SPR_respawn" and tried testing and it gave me this:
There must be something in my mission that is conflicting somehow, if only I knew what. Well, like I said, I have an older version of your respawn script working in a backup mission, so I'll probably just leave it as is and use the your newer version of your script in future mission creations.
I really liked how you added the ability to set an amount of respawns. It would be cool if there was a tiny counter in the corner of the screen someplace that kept track of total kills/total deaths. And after x amount of kills, you earn an extra life. Woohoo! And maybe after x amount of kills - the mission creator could execute a script, which could be something like... a script that executes and unlocks a better vehicle, or even better... a script gets executed that creates new marker where even more enemy respawn from - making it even more difficult to survive. Singleplayer always needed score keeper. Yeah, I know it's a military sim game, but there is now reason why we can't have a little bit of arcade action with it. lol.
Oh, I was going to try a setFace command on respawn to see if I could force my face to stay the same each time I respawn, since I usually respawn as a different face each time. It's actually funny in a way.
I was very busy creating and testing my new single player mission, but now every time I try to test it, I wind up playing it for hours and hours and just having fun instead, all because of your awesome script that allows players to respawn. After 3 hours, I finally stopped playing and started working, and the same thing happened again.
---------- Post added at 04:46 AM ---------- Previous post was at 04:29 AM ----------
I'm going to add a script on respawn that creates a new marker and spawns more enemy - and creates a trigger that detects when the player has died - and when the player dies activates another script that creates more enemy again and adds a new friendly player to my team as well. If only I could figure out how to get a score keeper that shows total kills someplace in the corner of the screen.