Jump to content
Sign in to follow this  
wuschel

Script Wizards: Carrying units over to the next mission

Recommended Posts

Hello,

I have a question regarding a simple two phase model for a mission. However, I have absolutetly no clue how to realize this.

Problem description

Mission A" starts with a 24 units. Let us say that during the usual events in the game, 10 of those AI units end up beeing dead. However, the mission is completed successfully.

Mission B" starts with the 14 surviving units from the first mission, and an additional compliment of editor set of 10 units.

While I understand that this might be possible by placing all units in the second mission and somehow script them out through a function and dataset carried over from the first mission, I have further request that makes the whole thing more problematic:

  • The name (text="";) field of the unit has to stay the same in the two missions. However, every single unit on the players side has a unique name/id.
  • the init line of all the leader units in Phase 2 has to contain a specific script. Thus, if they are killed in Phase 1, either the entire group is going down the drain (by beeing marked as killed), or the entire group needs to be reinstated. An Alternative would be substracting one of the regular grunts from the group and reinstate the leader.

Any ideas? Any thoughts?

Regards,

wuschel

Edited by wuschel

Share this post


Link to post
Share on other sites

Can you clarify what exactly you want?

Is it a single mission, with two phases as you say?

Is it a campaign with two missions?

Or are those two separate missions which should be linked?

Share this post


Link to post
Share on other sites

Sorry for not beeing clear enough.

I want two missions in a campaign, mission A and mission B, to be linked. I clarified the first posting.

Edited by wuschel

Share this post


Link to post
Share on other sites

If Vektorboson's script doesn't work for you the scripting commands you need are:

Save Indentity

Save Status

Save Var (Maybe)

Load Indentity

Load Status

These (like the names) will save info from one mission of a campaign and load it into the next mission. You can read up on these commands here:

http://community.bistudio.com/wiki/Category:Scripting_Commands_OFP_1.96

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  

×