Jump to content
Sign in to follow this  
DarkSchakal

Change player model ingame

Recommended Posts

Is it possible to change player model by a script, while ingame?

Thought of a mission, where you start as civilian, go to your HQ and get your uniform and weapons out of a crate.

Share this post


Link to post
Share on other sites

Hm, basicly, no.

But there might be a little hack\way around because some missions have a respawn type if you die, you spawn into one of your AI allies.

Simply give "control" to a person with different uniform and delete the other from the game\position at 0,0,0.

Don't ask me how though, I've never tried it. But it might work, OFP's scripting engine is fairly powerful enough to do little tricks like that.

wink_o.gif

Wait for BN880, jacobaby, or one of the other numerous scripting gurus to give a visit and post their sentiments.

smile_o.gif

Share this post


Link to post
Share on other sites

The only way to really switch bodies it to kill the original, and transfer the player into a new one via respawn.

Share this post


Link to post
Share on other sites

Hiya

I'm kinda new to mission editing for ofp. I'm trying to make a script that switches out a soldier model for an officer model at a certain point, using a fade to black to cover up the switchout. Anyone have any ideas?

I know that there are helicopters out there that switch out destroyed models when they are shot down, so I imagine that it is at least possible in the game engine.

Also, how do I use a "removeaction" once the action in the action menu has been triggered?

Share this post


Link to post
Share on other sites

Like Harnu said, maybe use a fade-to-black to kill your regular soldier model then respawn him as an officer? Either way, it's way too complicated for me. crazy_o.gif

Share this post


Link to post
Share on other sites
Hiya

I'm kinda new to mission editing for ofp. I'm trying to make a script that switches out a soldier model for an officer model at a certain point, using a fade to black to cover up the switchout. Anyone have any ideas?

Maybe make the soldier the only person in his group and set the mission to group respawn. Then join another unit to the group and setdammage the player. He should be killed and respawn into the new unit.

Quote[/b] ]I know that there are helicopters out there that switch out destroyed models when they are shot down, so I imagine that it is at least possible in the game engine.

That's something different as choppers are no players.

Quote[/b] ]Also, how do I use a "removeaction" once the action in the action menu has been triggered?

You give the action a name with something like name=addaction.. and can remove it using that name.

Share this post


Link to post
Share on other sites

Cheers. I think I can do that, but will it work in an SP mission? Is there a way to hide the command bar until after the player respawns so he doesn't know that there is another soldier in his group?

Share this post


Link to post
Share on other sites

Also, how can I fade to black when I kill the player and then fade back in when he is respawned?

I tried

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">titlecut ["","black out", 5]

and

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">cuttext ["","Black out",5]

They activated, but they did not work. I tried blacking out before and after I did "player setdammage 1", and no matter what, as soon as I kill the player to respawn, the black screen immediately goes away and I see the player collapse, die and then the camera moves to show the respawn in the other group member.

Is there a way to deactivate the death cam?

Or a way to instantaneously respawn as a different class?

Share this post


Link to post
Share on other sites

Does anyone know how to switch out objects during missions? I'd like my open tents to become closed tents when activated by a script.

Share this post


Link to post
Share on other sites

jubbie: there is life beyond death (cam) in ofp by putting a respawn (player setdammage 0) into a file with the name "onplayerkilled.sqs" (or something, you can find it in some missions for custom endscenes)

this prevents the "your dead" sequence to turn up, but it has the downside is that you can't access the "quit" menu anymore with escape, the player must alt-tab to exit or use a predefined radio alpha command "endmission" or "forceend" (which proclaims you to be dead even if you are not).

So I would recommend you not to use this method because players will get very angry if they have to crash their ofp just to get out of your mission.

BTW: let's put an end to discussion: there will be no way to change the player model ingame unless someone finally manages to make a model that adds the uniform by means of setobjecttexture. Period.

Share this post


Link to post
Share on other sites

Thanks Redface.

For OFP2, I'd like to recommend a script function, then:

unit RespawnAs new unit smile_o.gif

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  

×