OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: xCIA_BlackThorn on 23 Oct 2004, 02:56:18

Title: How do I change a unit to a different unit altogether...
Post by: xCIA_BlackThorn on 23 Oct 2004, 02:56:18
I want to change the (Player) Soldier in to a Sniper in mid game...how would I go about doing this?

Is it even possible?
Title: Re:How do I change a unit to a different unit altogether...
Post by: THobson on 23 Oct 2004, 08:21:50
The only way I know to change the body of a unit is by editing mission.sqs.  That is not possible within a mission, so I don't think it is possible to do what you want.  
Title: Re:How do I change a unit to a different unit altogether...
Post by: c_jay_ie on 23 Oct 2004, 10:46:43
Alright, I've an idea. Maybe you can camcreate a sniper, make him player, and then delete the soldier.

Would that work?
Title: Re:How do I change a unit to a different unit altogether...
Post by: macguba on 23 Oct 2004, 11:44:03
No.

The player unit is defined in the mission editor:  you can't change it during the game.   The workaround is to make a mini-campaign.   If you can figure out how to "make him player" you'll be a Flashpoint hero because nobody has done it yet.    Search the forums for dozens of threads about this, it is one of the commonest questions.

Your method is correct for changing the clothes of AI soldiers, except that you should use createUnit:  camCreate is for static objects, not AI.