ID:154446
 
This not the flying code. It's a flying code. I hope it's an interesting one.

turf/Enter(atom/movable/O)
if (ismob(O)) // if O isn't a mob, don't worry.
var/mob/m = O //make a mob var, so the compiler KNOWS this is a mob.
if (m.movetype == "flying")
if (src.low) src.density = 0 //if the wall is low, de-densify it.
if (!src.density) m.density = 0 //if the wall is NOT dense (or low), treat the mob as non-dense.
. = ..() //check the default proc and store it to the . var
if (src.low) src.density = 1 //reset the wall's density, if it's low
m.density = 1 //reset the mob's density
return . //we put ..() in here.
return ..() //if it's not a mob, we simply return ..()
turf
var
low
high_wall
density = 1
opacity = 1
low_wall
density = 1
opacity = 1
low = 1
mob
var
movetype = "walking"
verb
fly()
if (src.movetype == "walking")
src << "You take off into the air!"
src.movetype = "flying"
else if (src.movetype == "flying")
src << "You come in for a landing."
src.movetype = "walking"
else
src << "You're [movetype] right now."


What this code does is give you a "low" var that you can set to make a turf able to be flown over. Otherwise, flying lets you move over dense mobs and objs, but not dense turfs. I use the "low" var for bushes and outside walls (like the wall around an fortified village), but not mountains (too high) and the walls of a house (yes, you should be able to fly over a house, but the way the map is set up, this would put you inside the house.) You can use it however you want. Make all your dense turfs low if you want everything fly-over-able.

I'm not good at commenting code, but the Enter proc is the confusing part, so I did my best there. A couple of notes: one, this assumes that all mobs who will use the fly verb are dense, and that all turfs using the low var are dense. (If they're not, then you don't need to label them as low... anyone can move over them anyway!)

Note to anyone who uses this code: Type everything exactly as I've put it. Do not add anything that sets a mob's density to 0 when they take off. This is not necessary and makes the rest of the code pointless. This code works. If it doesn't, then YOU are the problem. Don't take credit for this code, but DO NOT MENTION ME ANYWHERE IN YOUR CREDITS OR I WILL SUE YOU FOR DEFAMATION OF CHARACTER. Do you think I want my name on your stupid game?
Hmmm interesting you scared them to death I don't think there gonna include you in there credits for sure now..And on a lighter note Lexy Just Killed the chance of anymore DBZ games we should be proud.
In response to Nadrew
how did he kill the chances for more dbz games?
In response to Valderalgx
1.He is a She
2.Read the post Carefuly and see.
In response to Nadrew
Dont find anything!
if its in the code i am just learning please explain!
i get it dont take credit for it, but dont put me in it that it nandrew?
In response to Valderalgx
Valderalgx wrote:
i get it dont take credit for it, but dont put me in it that it nandrew?

UHH...

...

WHAT?!
In response to Vortezz
nothing its for nandrew
In response to Valderalgx
Who is this "nandrew"?

I know of no Nandrew!
In response to Vortezz
nadrew