Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
daza

Any one know of a MP mission that has...

Recommended Posts

Does anyone know if there is a MP mission that has a gameplay element of players being able to get civillians or other AI units to join their group. (Not create a unit, but one that already exists).

I've made a VIP MP mission but having trouble with assigning a Civilian to a player who isn't Host. It works fine in the editor. To clarify more, a civilian needs to be added to a soldiers group (any player- not just team leader) who will be the VIPs body guard and leader. But if that soldier dies the civilian will be vulnerable to attack. Other players on the team should be able to go up to civilian and via addaction get the civilian to join their group.

Is there any released missions that have something like this? i need to work out how they managed it. My version if another player on a client machine adds civilian to their group it gets assigned to player who is on the host machine instead.

Daza

Share this post


Link to post
Share on other sites

Xeno's Domination "one team west - AI" has a built in "recruiting dock" where players are able to recruit AI soldiers (so civilians should be possible aswell).. Maybe you could ask him?

Share this post


Link to post
Share on other sites

>My version if another player on a client machine adds civilian to their group it gets assigned to player who is on the host machine instead.

Just a guess but it sounds like you are executing code like

civ join group player

on the server somehow.

---------- Post added at 11:07 AM ---------- Previous post was at 10:15 AM ----------

Just tried it here - this code works quite nicely....

if (not isServer)  exitwith {} ;

hostageMonitor={
    private ["_h"] ;
    _h = _this select 0;
    while {alive _h} do {
  {
       if ((_x distance _h) < 2) then {
	    [ _h] join _x ; 
       } ;
  } foreach (playableUnits) ;
  sleep 5 ;
    } ; 
} ;

{
  [_x] spawn {_this call hostageMonitor;} ;
} foreach [your list of civilians here] ;

As a result, I've just added hostage-objectives to the PVP script pack :)

Share this post


Link to post
Share on other sites

Thanks Flightster for your reply, but i dont think the script for that in domination includes other human players getting AI from another players squad to join theres. That is the main thing i want to do.

Sbsmac thanks for your little script there i will have to give that ago on my next day off.

Here is my current script im using below.

dor1 removeaction knock;

playSound "knocking_door";

if (alive vpciv1) exitwith

{hint "VIP1 Has already been taken into custody."};

_group = group player;

vpciv1 = _group createUnit ["sportswoman1", getpos player, [], 0, "form"];

dostop vpciv1;

vpciv1 dowatch player;

vpl1=true;

publicvariable ="vpl1";

tm1=vpciv1 addaction ["Follow me","foll1.sqf"];

(The foll1.sqf script is below)

player removeaction tm1;

[vpciv1] join player;

Does that shed some light as to my problem?

I will let you know how i get on with your script. Im still learning about scripting. Looking at your script...If a civ unit is within 2 feet or metres of player, they will automatically join the player. How will the script know to put player into _x?

Thanks for your help,

Daza

Share this post


Link to post
Share on other sites
Does anyone know if there is a MP mission that has a gameplay element of players being able to get civillians or other AI units to join their group. (Not create a unit, but one that already exists).

If you can wait a few more days, you can use the upcomming GLT framework for that :) Then you can set up who is allowed to recruit units of type "man" having a lower rank than the recruiter and you can set up blacklists with units who can't be recruited at all.

Share this post


Link to post
Share on other sites

I's still haven't solved this problem, and its the last thing i need to sort out before the MP mission is ready for release.

So i have set up a demo mission that only deals with my problem so some of you can have a look at it and see how i can get it to work.

I've made each unit the leader of their own group, and in the preview mode of the editor i was able to get the civ unit to join player, i team switched trying out all 3 soldiers.

I did manage to get a work around, just involving scripted loops/dofollow player etc.

But it would be more flexible if she was properly assigned to a player, more control over unit.

When i test this out in MP with a friend, once civ unit is created, she wont join other players group via the addaction. It works in SP.

If someone could help me get this working it would be enable me to finish this mission.

Thanks for your help :)

Here is the link to download the file its only 4kb

http://www.mediafire.com/?tmwjezqml44

Scripts i'm using;

dor1 setvehicleInit "dor1 removeaction knock";
processInitCommands;

if (alive vpciv1) exitwith
{hint "VIP1 Has already been taken into custody."};


_group = group player;
vpciv1 = _group createunit["sportswoman1", getpos player, [], 0, "form"];

vpciv1 setVehicleInit "this addaction ['Join my group','scriptVP1\jongrp.sqf']";
processInitCommands;

dostop vpciv1;

vpciv1 dowatch player;

[vpciv1] join player;
_grp = group player;
_grp selectleader player;

Reason i have selectleader line, is because when i was testing it in editor, the unit would put itself as leader and i was in civilians group. So putting selectleader line in seem to solve the problem. Even though i didnt encounter it a while back when i was trying to get this to work.

Share this post


Link to post
Share on other sites

I haven't forgot you :) The framework is close to being finished. However there are some bugs to be killed before release. Hang on a few days, then you'll only need to set some variables and you'll be able to recruit anyone you wish (or blacklist specific units).

Share this post


Link to post
Share on other sites
I haven't forgot you :) The framework is close to being finished. However there are some bugs to be killed before release. Hang on a few days, then you'll only need to set some variables and you'll be able to recruit anyone you wish (or blacklist specific units).

So with your framework you are working on, once a unit like a civilian is recruited to a player in MP, another player will be able to have that unit join them? and if the the player who has the unit/civ grouped to them dies, who takes over as team leader for the unit(s)?

Its annoying what works in SP doesnt in MP...sigh.

Share this post


Link to post
Share on other sites

First of all, our upcomming framework will work in SP and MP mode :) We're using it for months now including the testing sessions.

This single feature (there are plenty more in it) will work the following way:

1. You place a new game module in the editor

2. Inside the init.sqf you'll insert a line that ensures everything of the framework gets loaded before other content of the init.sqf will be executed.

3. In the init-line of the module you can define all necessary variables and options.

By default only units with a higher rank can recruit units with a lower rank. It simply wouldn't make sense if a private recruits a major for combat. First of all you can name the units that are allowed to recruit. I suggest that only group leader can do this.

You can set up which side the player can recruit. Supported sides are west, east, resistance and civilian - it doesn't matter what faction is used.

If you want, you can blacklist certain units that shouldn't be recruitable. But you don't have to name every unit that can be recruited in the first place. In theory it can be every infantry unit.

As soon as you have recruited a soldier via action menu entry he joins your group. You can command it like any other AI unit. It should work with human players too although I haven't tested yet.

Of course you can dismiss the unit at any place you want and re-recruit them later again.

There'll be some helping videos on youtube after the release and after I got my new TFT :o

I'm sure some of the other (optional) features will help you too in a way ... debugging stuff, marker scripts, first aid kits, revive features, easy briefing setup & task states, viewdistance & terrain grid changer, checkin scripts for vehicles, keycard simulator, group spawns etc.

But it's a lot of hard work. That's why it's taking so long :)

Share this post


Link to post
Share on other sites

Okay that sounds really good Legislator!

I will have a use for that in another mission i am creating. (i have about 3 different ones on the go lol)

Share this post


Link to post
Share on other sites

Good news ... the documentation is translated, the latest versions are checked. Now all we need to do is a basic test of our revive feature and I need to have a look into the example missions. I hope nothing unexpected will happen such as finding new bugs :D

By the way ... I'm gonna release finished missions with it starting with a small mission package. Further missions (up to 15 in total I guess) are on the way :) I'm sure they'll help as well. Maybe I can even lay hand on the Youtube tutorials this weekend but they're not critical right now.

Share this post


Link to post
Share on other sites
Sign in to follow this  

×