UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

How do I move the Pack A Punch using scripts?

broken avatar :(
Created 11 months ago
by Chadric273
0 Members and 1 Guest are viewing this topic.
broken avatar :(
broken avatar :(
Location: Minnesota
Date Registered: 7 July 2012
Last active: 5 months ago
Forum Rank
Legless Crawler
Primary Group
My Contact & Social Links
Chadric273's Groups
Chadric273's Contact & Social Linkschadric.hjellming
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.
Last Edit: February 25, 2021, 02:17:47 am by Chadric273

Loading ...