Post: How to put Zombieland Lift Map Edits in Your patch
10-20-2011, 03:09 PM #1
Hawkin
Lord of the Undead
(adsbygoogle = window.adsbygoogle || []).push({}); This will create Lifts like those in My COD4 Zombieland. These will also work in COD5 and Cod6 if you find new models.

First you need to Precache the models. These should go in your weapons.gsc or rank.gsc init() thread. Or a linked level thread that doesn't have any wait statements between it and the init() thread.

    precacheModel( "com_lightbox_on" );
precacheModel( "com_junktire" );
precacheModel( "com_junktire2" );
precacheModel("bc_military_tire05_big");


MAIN LIFT THREAD Put this somewhere in your gsc.

    CrLift(pos, height)
{ lift = spawn("script_model", pos);
lift setModel("com_junktire");
wait .05;
if(getDvar("mapname") == "mp_citystreets" || getDvar("mapname") == "mp_showdown" || getDvar("mapname") == "mp_backlot" || getDvar("mapname") == "mp_bloc" || getDvar("mapname") == "mp_carentan") lift setModel("com_junktire2");
lift.angles = (0,0,270);
if(getDvar("mapname") == "mp_shipment")
{ lift setModel("bc_military_tire05_big");
lift.angles = (0,0,0);
}
level.yelcircle = loadfx( "misc/ui_pickup_available" );
cglow = SpawnFx(level.yelcircle, pos);
TriggerFX(cglow);
wait .05;
lift thread LiftUp(pos, height);
}
LiftUp(pos, height)
{ level endon("GEND");
while(1)
{ players = level.players;
for ( index = 0; index < players.size; index++ )
{ player = players[index];
if(Distance(pos, player.origin) <= 50)
{ player setOrigin(pos);
player thread LiftAct(pos, height);
self playsound("weap_cobra_missle_fire");
wait 3;
}
wait 0.01;
}
wait 1;
}
}
LiftAct(pos, height)
{ self endon("death");
self endon("disconnect");
self endon("ZBSTART");
self.liftz=1;
posa = self.origin;
fpos = posa[2] + height;
h=0;
for(j=1; self.origin[2] < fpos; j+=j)
{
if(j > 130) j=130;
h=h+j;
self SetOrigin((pos) + (0,0,h));
wait .1;
}
vec = anglestoforward(self getPlayerAngles());
end = (vec[0] * 160, vec[1] * 160, vec[2] * 10);
if(BulletTracePassed(so,so + end,false,self) && BulletTracePassed(soh,soh + end,false,self)) self SetOrigin(self.origin + end);
wait .2;
posz = self.origin;
wait 4;
self.liftz=0;
if(self.origin == posz) self SetOrigin(posa);
}


Create LIFT Command line example Put this where and when you want to create a lift on a map. This is an example of one I used from Backlot.
    CrLift((1330,564,64),700);


Create Lift Command Explained - CrLift((x,y,z, location of where you want the lift),how high you want the lift to send you.);

Good Luck.
(adsbygoogle = window.adsbygoogle || []).push({});

The following 6 users say thank you to Hawkin for this useful post:

MeowDev, Baby-panama, Diddles2Fresshh, DlBSY993, lovebros, Uk_ViiPeR
10-24-2011, 12:54 PM #11
247Yamato
< ^ > < ^ >
Originally posted by Hawkin View Post
Well yes, but I don't think it wouldwork like I think you'd want it to. The purpose of this script is to launch someone up in the air a desired distance, then push them forward just a bit. Also I am not sure what your desired effect is. Are you looking for a trampoline effect? Do you want to launch someone up and up forever?

Are you trying to make someone fly? This code also can send you flying straight though buildings, it will not recognize solid objects. Without the command SetVelocity() (only available in MW2 and WAW Zombies/Coop-op) It's is hard to move players without moving straight through solid models/objects.


You can avoid the object going through walls using bullettraces
10-24-2011, 01:54 PM #12
when are you releasing a new zombieland coz your map edits own.
10-26-2011, 04:03 AM #13
Hawkin
Lord of the Undead
Originally posted by 247Yamato View Post
You can avoid the object going through walls using bullettraces


yeah i guess you could. have you made one? That thread would be as complicated as it was large. I'd give someone the sacred golden cookie for the person that made that, and made it not lag the gameout.
10-26-2011, 12:51 PM #14
247Yamato
< ^ > < ^ >
Originally posted by Hawkin View Post
yeah i guess you could. have you made one? That thread would be as complicated as it was large. I'd give someone the sacred golden cookie for the person that made that, and made it not lag the gameout.


I havent made a block that avoid walls, but I did with a swimmer, a bot, a tank or a helicopter. I think that the code is fine, just fit it with your block, be sure to put correctly the angles beetween the 2 points you are going to use in the moving carepackage:

    trace = bullettrace(block.origin+(0,0,10),block.origin+(0,0,10)+anglestoforward((block.angles)*50),false,self);
if(trace["fraction"] != 1 && trace["surfacetype"] != "default")
block moveto(block.origin,0.3);
else
block moveto(trace["position"],0.3);

The following user thanked 247Yamato for this useful post:

Hawkin
10-29-2011, 03:54 PM #15
Hawkin
Lord of the Undead
Originally posted by 247Yamato View Post
I havent made a block that avoid walls, but I did with a swimmer, a bot, a tank or a helicopter. I think that the code is fine, just fit it with your block, be sure to put correctly the angles beetween the 2 points you are going to use in the moving carepackage:

    trace = bullettrace(block.origin+(0,0,10),block.origin+(0,0,10)+anglestoforward((block.angles)*50),false,self);
if(trace["fraction"] != 1 && trace["surfacetype"] != "default")
block moveto(block.origin,0.3);
else
block moveto(trace["position"],0.3);


That is cool. Definitely worthy of a golden cookie. +rep. I wish I had this when making COD4 Zombieland. You can make people fly without the noclip side effect. This should be added to my lift code at the end when it pushes you forward. To avoid ppl getting stuck in buildings, and has many other applications.

Questions.
What does trace["fraction"] return or measure? I have never heard of that before. Also for the Surfacetype, default is air I am guessing. Do you know what other surface types are there? Is the ground different from a building?

The following user thanked Hawkin for this useful post:

247Yamato
10-29-2011, 04:34 PM #16
Im looking for a zombieland game, I dont have a jailbroken ps3 or whatevv, so I can't do it myself, but If anyone is hosting I'd love to join, <3 hawkin
10-30-2011, 09:21 AM #17
247Yamato
< ^ > < ^ >
Originally posted by Hawkin View Post
That is cool. Definitely worthy of a golden cookie. +rep. I wish I had this when making COD4 Zombieland. You can make people fly without the noclip side effect. This should be added to my lift code at the end when it pushes you forward. To avoid ppl getting stuck in buildings, and has many other applications.

Questions.
What does trace["fraction"] return or measure? I have never heard of that before. Also for the Surfacetype, default is air I am guessing. Do you know what other surface types are there? Is the ground different from a building?


The trace fraction is measure that the game does to see if the "bullet" you throw goes through the wall or not, it can have a value beetween 1 and 0, leave it as how I gave you to detect walls, about the surfaces, yes, default is air, this are the rest:

    asphalt
bark
brick
carpet
cloth
concrete
default
dirt
flesh
foliage
glass
grass
gravel
ice
metal
mud
paper
rock
sand
snow
water
wood


Another code I thought for your mod,using the distance to an obstacle(see the differences,you would need to re edit it), PointA and PointB are the 2 points you select to make the package path:

    trace = bullettrace(block.origin+(0,0,10),pointB,false,self);
if(distance(trace["position"],block.origin)<50)
block moveto(PointA,0.3);
else
block moveto(PointB,0.3);

The following user thanked 247Yamato for this useful post:

Hawkin
10-30-2011, 05:47 PM #18
Hawkin
Lord of the Undead
Originally posted by 247Yamato View Post
I havent made a block that avoid walls, but I did with a swimmer, a bot, a tank or a helicopter. I think that the code is fine, just fit it with your block, be sure to put correctly the angles beetween the 2 points you are going to use in the moving carepackage:

    trace = bullettrace(block.origin+(0,0,10),block.origin+(0,0,10)+anglestoforward((block.angles)*50),false,self);
if(trace["fraction"] != 1 && trace["surfacetype"] != "default")
block moveto(block.origin,0.3);
else
block moveto(trace["position"],0.3);


Thanks, very cool. Tested it out. Just in case you use this in WAW the surface type for air is "none" and "default" is for A Solid Trigger Radius. Your code worked well, in my tests.

I didn't want this for a moving carepackage, I wanted this to make a person fly, but not through buildings, wal, etc. although a flyable carepackage would be cool.

In the end I found this worked better for flying humans, because it would recognize placed models, which don't have surfacetypes or Friction ratings.
    if(!SightTracePassed(self GetEye(),self GetEye()+anglestoforward(self getPlayerAngles())*50),false,self)) moveto...


It's still your same idea just a different function. I'll be sure to mention you if I release a patch with it. Thanks again.
10-30-2011, 09:26 PM #19
247Yamato
< ^ > < ^ >
Originally posted by Hawkin View Post
Thanks, very cool. Tested it out. Just in case you use this in WAW the surface type for air is "none" and "default" is for A Solid Trigger Radius. Your code worked well, in my tests.

I didn't want this for a moving carepackage, I wanted this to make a person fly, but not through buildings, wal, etc. although a flyable carepackage would be cool.

In the end I found this worked better for flying humans, because it would recognize placed models, which don't have surfacetypes or Friction ratings.
    if(!SightTracePassed(self GetEye(),self GetEye()+anglestoforward(self getPlayerAngles())*50),false,self)) moveto...




It's still your same idea just a different function. I'll be sure to mention you if I release a patch with it. Thanks again.


ok, the bullettrace can detect the placed models too, :P: trace["entity"]

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo