#1 07-08-2010 02:46

Deji
From: UK
Registered: 09-11-2008
Posts: 189
Website

Actor Disassociation

I'm nearly done with a simple mod to freeze any peds that you take a picture of, but for one problem...

Even though I've frozen his current actions, more are still being added... I tried to fix this by giving him a blank Decision Maker, but it didn't work out like I thought it would... He still wants to walk around and although he doesn't do that.. He rotates, moves his head and sometimes escapes from his frozen state if his actions get interrupted.


Is there a way to prevent the ped from being able to do anything else from that point on? And without interrupting the current animation or having to assign the animation to it (since I have his current anim, but not the IFP of that anim)?


Here is some of the code... Where the file that is being read from contains a list of anims (slimmed down to the ones that are likely in place at any moment).

                    if
                        8AD7:   not read_string_from_file 2@ to 10@v size 32
                    then
                        break
                    end
                    0AA7: call_function 0x826330 num_params 1 pop 1 10@v to 3@   // strlen
                    0AC7: 4@ = var 10@ offset
                    005A: 4@ += 3@
                    000E: 4@ -= 1
                    0A8C: write_memory 4@ size 1 value 0 virtual_protect 0  // NULL Terminate (overwrite \r)
                    if
                        0611:   actor 1@ performing_animation 10@v
                    then
                        0393: actor 1@ perform_animation 10@v at 0.0 times_normal_rate
                        0489: set_actor 1@ muted 1
                    end

Offline

#2 10-08-2010 15:19

angeloelibz24
Registered: 18-06-2009
Posts: 22

Re: Actor Disassociation

Dunno if this helps, but I think you should try putting the code in a loop so whenever the ped changes animations he/she will always freeze.

Offline

#3 10-08-2010 17:34

Deji
From: UK
Registered: 09-11-2008
Posts: 189
Website

Re: Actor Disassociation

That'd take a lot of memory... But maybe I could work with it...

Edit

Hmm.. It kinda works, but the ped still switches animations on certain occasions.

The ped switches animations, then is freezed on that animation... I wanna disable him from starting a new animation completely.


Does anyone know how to get an IFP file that has a specified animation inside?

Last edited by Deji (10-08-2010 19:44)

Offline

Board footer

Powered by FluxBB