Help with camra mod

Discuss thug2 modding, post your own, share your ideas, ask questions.
GothiC-_-THPS
Posts: 8
Joined: Fri Dec 23, 2011 11:54 am
Contact:

Help with camra mod

Postby GothiC-_-THPS » Fri Dec 23, 2011 11:59 am

Hello I was wondering how to get the camra mode that is used in create a goal when you spawn a ped. so I can use it to spawn stuff. Thank you
Lezzer
Posts: 48
Joined: Tue Jan 04, 2011 10:50 am
Contact:

Re: Help with camra mod

Postby Lezzer » Wed Dec 28, 2011 11:10 am

This tutorial shows you how to spawn a ped as a composite object.

For the anim you want to play, go to the allanims.qb file.

Find an anim you want, for example I want $Ped_Bikini_LyingFrontToBack$.


When you have the anim you want, go up, and find the function name. The function $Ped_Bikini_LyingFrontToBack$ 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 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

So this is how you spawn a ped, I already created the function for you, so all you have to do is find an anim you want, put the function name of the anim you want in $AnimName$, and put the ReferenceChecksum in the $SkeletonName$.

Now you need to play the anim, you already have the $SkeletonName$, and $AnimName$ set up, so now you need to set up the anim itself.

Code: Select all

         :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

$model$ = %s(43,"Peds\Ped_FemaleFull01\Ped_FemaleFull01.skin")

Code: Select all

   :i $Pedestrian$.call $Obj_PlayAnim$ arguments
      $anim$ = $Ped_Bikini_LyingFrontToBack$$cycle$

This is the anim. Remember at the start, in the allanims file, I chose $Ped_Bikini_LyingFrontToBack$. You can look for any anim you want in the allanims file, just remember to go back up to the function its in, get the function name and reference Checksum.

Its tutorial by Anteara
Link to tutorial : http://ng-thps.com/index.php/forum/view ... f=10&t=141

Return to “THUG2 modding”

Who is online

Users browsing this forum: No registered users and 2 guests