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

Campaign Identities

Recommended Posts

Is it possible to rotate new identities into a mission based upon the existence (or non-existence) of the original identities used?

Example:

In mission 1 a US patrol (all with identities set) comes under fire. Some grunts may die and when I start mission 2 I don't want them to reappear on the roster.

I'm familiar with deleteidentity and assume that it removes the identity from the campaign.ext file. Is there some way of querying whether or not this identity still exists and, if not, selecting the next unassigned identity available in the campaign.ext file? Or is there some way of deleting an identity and replacing it with another (e.g. using a number such as usi1 to identify the officer in mission and, when the rupert bites dust, replace the usi1 identity in the campaign.ext file with a new face-voice-name?)

The main aim is to create a squad in mission 1 where killed soldiers don't come back but are replaced by fresh blood in each of the subsequent 9 missions as required.

Share this post


Link to post
Share on other sites

dePBOd the resistance campaign and got to grips with the savestatus and savevar command (or so I thought). Can somebody please tell me where I'm going wrong with the init.sqs for this, the 5th mission in my campaign?

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">;recreate survivors group

_sqd=[usi1,usi2,usi3,usi4,usi6,usi8,uspc];

;check mortals and add to _srv

?davisdead==davisdead:deletevehicle usi4;goto "chkrl"

_sqd=_sqd+[usi4];usi4 setidentity "DavisBill";goto "chkrl"

#chkrl

?rushmoredead==rushmoredead:deletevehicle usi5;goto "chkla"

_sqd=_sqd+[usi5];usi5 setidentity "RushmoreLee";goto "chkla"

#chkla

?lambertdead==lambertdead:deletevehicle usi7;goto "ldstts"

_sqd=_sqd+[usi7];usi7 setidentity "LambertArmand";goto "ldstts"

;load status

#ldstts

_sqdm=0;

_sqdc=count _sqd;

_pmis="xa03";

#nxsldr

xx=(_sqd select _sqdm) loadstatus format["xa03usi%1",(_sqdm)];

_sqdm=_sqdm+1;

?_sqdm<_sqdc:goto "nxsldr"

This code should feed from the exit.sqs of the previous mission (obviously) so I've included it in case that's the source of the problem:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_srv=[usi1,usi2,usi3,usi6,usi8,uspc]

;check for dead soldiers

?davisdead==davisdead:goto "chkrl"

?!alive usi4:davisdead=1;savevar "davisdead";goto "chkrl"

_srv=_srv+[usi4];

#chkrl

?rushmoredead==rushmoredead:goto "chkla"

?!alive usi5:rushmoredead=1;savevar "rushmoredead";goto "chkla"

_srv=_srv+[usi5];

#chkla

?lambertdead==lambertdead:goto "svsqd"

?!alive usi7:lambertdead=1;savevar "lambertdead";goto "svsqd"

_srv=_srv+[usi7];

;save squad

"_x setdamage 0" foreach units group uspc;

#svsqd

_mis="xa03";

_sqdm=0;

_sqdc=count _srv;

#nxsldr

xx=(_srv select _sdqm) savestatus _mis+(format["usi%1",_sqdm]);

?_sqdm<_sqdc:_sqdm=_sqdm+1;goto "nxsldr"

Can somebody please point out the bleeding obvious - 'cause I can't see it.

One more thing - the error:

rap ...: [] encountered, = expected

The [] could be an empty square.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×