Okay, I've figured out how to spawn the ped as a composite object, and I've figured out how to play anims on the ped. It's possible to change the anim, etc.
Firstly, as it took me a while to figure this out, i'll tell you how to play the anims...
This is what you must know....
For the anim you want to play, go to the THAW equivalent of the allanims file. (I'm going to show functions / anims from THUG2, it should work for THAW, I don't see any reason why it wouldn't be the same)
Find an anim you want, for example I want $Ped_Bikini_LyingFrontToBack$.
The function it is in is called
Code: Select all
:i function call $animload_Ped_Bikini$ arguments
$LoadFunction$ = $LoadAnim$
:i call $SetReferenceChecksum$ arguments
$Ped_Female$
take note of the function name and checksum.
Go back to your composite object script,
Code: Select all
:i function $anteara_ped12lol$
:i $Skater$.$Obj_GetPosition$
:i $CreateCompositeObject$:s{
:i $Components$ =
:i :a{
:i :s{$component$ = $motion$:s}
:i :s{$component$ = call $Suspend$ arguments
$NeverSuspend$:s}
:i :s{$component$ = $skeleton$
:i $SkeletonName$ = $Ped_Female$
:i $max_bone_skip_lod$ = %i(0,00000000)
:i :s}
:i :s{$component$ = $model$
:i :s}
:i :s{$component$ = $AnimBlender$
:i $AnimName$ = $animload_Ped_Bikini$
:i $SkeletonName$ = $Ped_Female$
:i :s}
:i :a}
:i $params$ = :s{$pos$ = %GLOBAL%$pos$$model$ = %s(43,"Peds\Ped_FemaleFull01\Ped_FemaleFull01.skin")$name$ = $Pedestrian$:s}
:i :s}
:i $Pedestrian$.call $Obj_PlayAnim$ arguments
$anim$ = $Ped_Bikini_LyingFrontToBack$$cycle$
:i endfunction
Code: Select all
:i :s{$component$ = $skeleton$
:i $SkeletonName$ = $Ped_Female$
:i $max_bone_skip_lod$ = %i(0,00000000)
:i :s}
The skeleton name
must be $Ped_Female$, or else the anim won't play. This is because (I think) the ReferenceChecksum is called Ped_Female.
Code: Select all
:i :s{$component$ = $AnimBlender$
:i $AnimName$ = $animload_Ped_Bikini$
:i $SkeletonName$ = $Ped_Female$
:i :s}
Here, again, the skeleton name is $Ped_Female$. The AnimName is $animload_Ped_Bikini$ because that is the function name.
Code: Select all
:i function call $animload_Ped_Bikini$ arguments
The function $anteara_ped12lol$
should work in THAW, you just need the change the skeleton, the AnimBlender component, the model, and the Anim Name to what you want.
Again... I don't see why this would crash in THAW.. The format for THUG2 and THAW CompositeObjects are exactly the same.
Edit: I don't have THAW at the moment, so can anyone with it (Morten, Quazz, Whoelse, etc) that is capable of doing this properly please test this code + fixes for thaw and tell me if it works for THAW as well? I ask this because I don't see why the code morten supplied would crash the OP and Polak, it seems like a perfect code...