OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: bedges on 25 Oct 2007, 10:47:15

Title: killing me softly...
Post by: bedges on 25 Oct 2007, 10:47:15
i have a mission here where i need to create a corpse. simple, you might think - just setdamage to 1, what's the problem?

the problem is that the above method creates a corpse that looks like it's been run over by an exploding lawnmower. what i need is a body that is 'dead' but unmarked.

what i have so far is a unit which has been given a "combatdead" switchmove, i've set the facemimic to stop the changing expressions, and i've set the face animation to stop him blinking. it looks splendid: the only problem now is that if you shoot the 'dead' loon, he says "ouch! stop that!"

any ideas?
Title: Re: killing me softly...
Post by: h- on 25 Oct 2007, 15:00:22
createVehicle the unit and switchmove it.
This way you create an empty shell of a soldier looking dead, if you shoot it it bleeds but doesn't shout anything..
Title: Re: killing me softly...
Post by: limmy3 on 25 Oct 2007, 15:32:19
Hi all,

well, all animation figures are blinking.

Quote
createVehicle the unit and switchmove it.
Why didn't you write your code? ???

I did this
Code: [Select]
_soldier = "SoldierWB" createVehicle getmarkerpos "tankFactory"and got that
Quote
_soldier = "SoldierWB" createVehicle getmarkerpos "tankFactory" : ERROR local variable in global space
:(

Then I did this
Code: [Select]
_soldier = "SoldierWB" createVehicle getmarkerpos "tankFactory"; this PlayMove "CombatDead"and didn't get an ERROR.  :good:
But the soldier didn't dy.

Here is my dead animation as zip file which I did for simular purpose.

Regards limmy3


Edit: attachment (Switch- PlayMove commands.Intro.zip) lost in the crash of 2009 - WEK
Title: Re: killing me softly...
Post by: Mr.Peanut on 25 Oct 2007, 17:03:44
What happens if you use camCreate?
Title: Re: killing me softly...
Post by: h- on 25 Oct 2007, 20:37:15
Quote
Why didn't you write your code?
Because I was answering to bedges and I know he knows what to do   :D
And besides, you learn when trying to figure things out by yourself, not by someone telling you "do this, don't care why" :P


Where did you put your creation code?
The 'global space' suggests you used it in either a unit's init field or in a trigger where local variables (with the underscore, such as your _soldier) do not work.

As for the anim not working, use switchMove, not playMove.
Because some anims work with switchmove only, and it's possible that createVehicled unit doesn't comply with playmove..

Quote
Then I did this
Which makes no sense.
First you create a soldier referenced with variable _soldier and then you playMove something referenced with this.
If that code was in a trigger or in a unit's init field this refers to the trigger/unit, not the created soldier..

If you wish to use the trigger/unit's init field
Code: [Select]
someloon="SoldierWB" createVehicle someposition; someloon switchMove "combatdead"In a script executed from somewhere
Code: [Select]
_soldier = "SoldierWB" createVehicle someposition
_soldier switchMove "combatdead"
Title: Re: killing me softly...
Post by: limmy3 on 25 Oct 2007, 22:36:57
Hello,

Quote
And besides, you learn when trying to figure things out by yourself, not by someone telling you "do this, don't care why"  :P
Sure but I never had the feeling that it was that easy with "do this, don't care why"  :scratch:

Quote
Quote
Then I did this
Which makes no sense.
There's a lot more to clearn for me.
Finding your code would be playing lotto for me.  :whistle:

Regards limmy3

Title: Re: killing me softly...
Post by: h- on 26 Oct 2007, 03:53:55
Any of the above examples work for you?
Title: Re: killing me softly...
Post by: bedges on 26 Oct 2007, 10:06:59
i'm without my pc for the time being, so i'll give these suggestions a try when i am reunited with my love.

thanks meantime gents.  :good:
Title: Re: killing me softly...
Post by: THobson on 23 Nov 2007, 16:16:59
If they you don't mind a single wound, you could camcreate a bullet inside them.  They won't look all bloody, except where the bullet was, and they certainly won't blink.