PDA

View Full Version : Change player model ingame



DarkSchakal
Jan 26 2004, 00:38
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.

OmniMax
Jan 26 2004, 00:40
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.

http://forums.bistudio.com/oldsmileys/wink_o.gif

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

http://forums.bistudio.com/oldsmileys/smile_o.gif

Harnu
Jan 26 2004, 01:08
The only way to really switch bodies it to kill the original, and transfer the player into a new one via respawn.

DarkSchakal
Jan 26 2004, 09:24
okay that´s a beginning, but how do i do that?

jubbie
Mar 30 2004, 14:33
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?

Hellfish6
Mar 30 2004, 15:52
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. http://forums.bistudio.com/oldsmileys/crazy_o.gif

benu
Mar 30 2004, 19:18
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.

jubbie
Mar 30 2004, 19:55
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?

jubbie
Mar 30 2004, 20:38
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 &#91;&#34;&#34;,&#34;black out&#34;, 5&#93;[/QUOTE]
and
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">cuttext &#91;&#34;&#34;,&#34;Black out&#34;,5&#93;[/QUOTE]

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?

jubbie
Mar 31 2004, 14:56
Does anyone know how to switch out objects during missions? I&#39;d like my open tents to become closed tents when activated by a script.

redface
Mar 31 2004, 17:55
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&#39;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&#39;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.

jubbie
Mar 31 2004, 18:31
Thanks Redface.

For OFP2, I&#39;d like to recommend a script function, then:

unit RespawnAs new unit http://forums.bistudio.com/oldsmileys/smile_o.gif