Modme Forums
Menu:

Zombies not walking onto moving platform (elevator)

Game Modding | Call of Duty: Black Ops 3 | Scripting


xReaction:

So, I'm currently working on this little elevator that works almost flawlessly. the doors move how I want them to, it loops perfectly to where it can go up and down. The only problem is that zombies just dont walk inside the elevator. I've tried so many different things in the code, in radiant, I've tried using DYNAMICPATH, not using it, using movingplatform_enabled... everything. tried making a small bridge with a monster clip and using the ConnectPaths() function... nothing seems to work. The zombies either walk up to the door and move in place, or dont target the player at all when you're inside. If anyone can help me with this (literally just make it so the zombies walk inside the elevator and move with it when the button is pressed) I'd appreciate it massively. For the time being I've moved the elevator door clips so that doesn't cause any problems.

I'll attatch some screenshots of brushmodels and stuff below:


function elevatorIdle()
{
    level.elevator_models_struct PlayLoopSound("elevator_music_loop");
    level.zombie_enter_elevator_clip ConnectPaths();
    foreach(model in level.elevator_models)
    {
        model SetMovingPlatformEnabled(false);
        model ConnectPaths();
        model LinkTo(level.elevator_models_struct);
    }
    
    while(1)
    {
        level.elevator_move_trig SetCursorHint("HINT_ACTIVATE");
        level.elevator_move_trig SetHintString("Press ^3&&1^7 to use elevator [Cost: "+level.elevator_price + "]");
        level.elevator_move_trig waittill("trigger", player);
        if(player.score >= level.elevator_price)
        {
            player.score = player.score - level.elevator_price;
            level.elevator_move_trig Hide();

            if(level.elevator_at_floor1 == true)
            {
                thread goToFloor2();
                wait(10);
            }

            else
            {
                thread goToFloor1();
                wait(10);
            }
        }

        else
        {
            score_left = level.elevator_price - player.score;
            level.elevator_move_trig SetCursorHint("HINT_NOICON");
            level.elevator_move_trig SetHintString("You are missing " +score_left+ " points");
            wait(1.5);
        }
    }
    
}

function goToFloor2()
{

    level.elevator_move_trig Hide();
    level.firstfloor_elevator_door_clip Show();
    level.inside_elevator_door_clip Show();
    level.inside_elevator_door_model_left PlaySound("lift_door_close");
    level.inside_elevator_door_model_left MoveX(36,1,0.9,0.1);
    level.inside_elevator_door_model_right MoveX(-36,1,0.9,0.1);
    level.firstfloor_elevator_door_model_left MoveX(36,1,0.9,0.1);
    level.firstfloor_elevator_door_model_right MoveX(-36,1,0.9,0.1);
    wait(1.2);
    foreach(model in level.elevator_models)
    {
        model SetMovingPlatformEnabled(true);
        model LinkTo(level.elevator_models_struct);
    }
    level.elevator_models_struct PlaySound("lift_move");
    level.elevator_models_struct MoveZ(-352,4);
    level.elevator_move_trig MoveZ(-352,4);
    level.inside_elevator_door_model_left MoveZ(-352,4);
    level.inside_elevator_door_model_right MoveZ(-352,4);
    wait(4.2);
    level.elevator_models_struct PlaySound("lift_arrive");
    level.inside_elevator_door_model_left MoveX(-36,1,0.9,0.1);
    level.inside_elevator_door_model_right MoveX(36,1,0.9,0.1);
    level.secondfloor_elevator_door_model_left MoveX(-36,1,0.9,0.1);
    level.secondfloor_elevator_door_model_right MoveX(36,1,0.9,0.1);
    level.secondfloor_elevator_door_model_left PlaySound("lift_door_open");
    level.secondfloor_elevator_door_clip Hide();
    level.inside_elevator_door_clip Hide();
    wait(1);
    foreach(model in level.elevator_models)
    {
        model SetMovingPlatformEnabled(false);
    }
    level.elevator_move_trig Show();
    level.elevator_move_trig SetCursorHint("HINT_NOICON");
    level.elevator_move_trig SetHintString("");

    level.elevator_at_floor1 = false;
}

function goToFloor1()
{
    level.elevator_move_trig Hide();
    level.secondfloor_elevator_door_clip Show();
    level.inside_elevator_door_clip Show();
    level.inside_elevator_door_model_left PlaySound("lift_door_close");
    level.inside_elevator_door_model_left MoveX(36,1,0.9,0.1);
    level.inside_elevator_door_model_right MoveX(-36,1,0.9,0.1);
    level.secondfloor_elevator_door_model_left MoveX(36,1,0.9,0.1);
    level.secondfloor_elevator_door_model_right MoveX(-36,1,0.9,0.1);
    wait(1.2);
    level.elevator_models_struct PlaySound("lift_move");
    level.elevator_models_struct MoveZ(352,4);
    level.inside_elevator_door_model_left MoveZ(352,4);
    level.inside_elevator_door_model_right MoveZ(352,4);
    wait(4.2);
    level.elevator_models_struct PlaySound("lift_arrive");
    level.inside_elevator_door_model_left MoveX(-36,1,0.9,0.1);
    level.inside_elevator_door_model_right MoveX(36,1,0.9,0.1);
    level.firstfloor_elevator_door_model_left MoveX(-36,1,0.9,0.1);
    level.firstfloor_elevator_door_model_right MoveX(36,1,0.9,0.1);
    level.secondfloor_elevator_door_model_left PlaySound("lift_door_open");
    level.firstfloor_elevator_door_clip Hide();
    level.inside_elevator_door_clip Hide();
    wait(1);
    level.elevator_move_trig Show();
    level.elevator_move_trig SetCursorHint("HINT_NOICON");
    level.elevator_move_trig SetHintString("");


    level.elevator_at_floor1 = true;
}

https://gyazo.com/b05ecaaf3ff1a85da34bb8160bcf8fb3


Fanatic:

how did you fix this homie, having the same issue myself


xReaction:

how did you fix this homie, having the same issue myself

So i just used a workaround and put a monster clip on the same level as the hallway outside, and just killed the zombies if they were touching when the elevator was used