Call of Duty: Black Ops 3 => Help Desk => Scripting => Topic started by: Chadric273 on February 25, 2021, 02:15:52 am

Title: How do I move the Pack A Punch using scripts?
Post by: Chadric273 on February 25, 2021, 02:15:52 am
Hello all. So I know how to script an script_model or script_brushmodel to move however I please, but I can not figure out how to get the PaP to move. I tried giving the prefab a targetname and then refer to that in the scripts using GetEnt. I have also attempted to use GetEnt by setting up a script_string KVP on the PaP prefab and then calling it out in scripts. Both methods did not work. It seems like the KVP's of targetname and script_string are not working to call out the PaP in my scripts with GetEnt. So, does anyone know how to move use GetEnt on the PaP prefab or simply how to move the PaP so it lowers down to a lower position? Thanks in advance!

function PaPelevator()
    upstairsTrigger = GetEnt("PaPelev_topLevel","targetname");
    upstairsLeftDoor = GetEnt("PaPdoor_topLeft","targetname");
    upstairsRightDoor = GetEnt("PaPdoor_topRight","targentame");

    upstairsTrigger SetHintString("Power must be turned on.");
    upstairsTrigger SetCursorHint( "HINT_NOICON" );

    level flag::wait_till( "power_on" );

    upstairsTrigger SetHintString("Requires activiation from the lower level panel.");

    elevatorPlatform = GetEnt("PaPelev_platform","targetname");
    PaP = GetEnt("PaP","targetname");
    Cargo1 = GetEnt("PaPelev_cargo1","targetname");
    Cargo2 = GetEnt("PaPelev_cargo2","targetname");
    Cargo3 = GetEnt("PaPelev_cargo3","targetname");
    Cargo4 = GetEnt("PaPelev_cargo4","targetname");

    elevatorPlatform MoveZ(-100, 5);
    PaP MoveZ(-100, 5);
    Cargo1 MoveZ(-100, 5);
    Cargo2 MoveZ(-100, 5);
    Cargo3 MoveZ(-100, 5);
    Cargo4 MoveZ(-100, 5);
This is what I have written. The cargo elements work perfectly. The PaP does not however.