Jump to content
Sign in to follow this  
Sandman

Intimidate/Cuff multiple enemies at once

Recommended Posts

Sandman

Hello,

The following code/script lets you cuff multiple enemies at once. Especially useful when playing Single Player (SP). Credit goes to Harfatus for this code in his StealthFixer, I just edited it so that it can be used when not in stealth as well.

function GroupAIStateBase:has_room_for_police_hostage()

        local global_limit = 2 --Just change it to as many enemies as you want to be able to intimidate at once.



        for u_key, u_data in pairs( self._player_criminals ) do

            local limit

            if u_data.unit:base().is_local_player then

                limit = managers.player:upgrade_value( "player", "ene_hostage_lim_1", 2 ) --Just change it to as many enemies as you want to be able to intimidate at once.  Only the last number needs changing (2).

            else

                limit = u_data.unit:base():upgrade_value( "player", "ene_hostage_lim_1" )

            end

            global_limit = limit and math.max( global_limit, limit ) or global_limit

        end



        return ( self._police_hostage_headcount < global_limit )

    end

Enjoy!

Sandman.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Stop being a peeping tom and join the community.... we got cookies

Join the crew now

Sign in

Already part of the crew? Board right here

Sign In Now
Sign in to follow this  

×