turf
var
air=100
proc
airit()
for(var/turf/T in range(1,src))
if(T.air<src.air)
var/a=(src.air/10)
T.air+=a
src.air-=a
sleep(5)
ID:164891
Mar 31 2007, 10:38 am
|
|
I am trying to make an air system...
|
Mar 31 2007, 10:41 am
|
|
You should set the air levels for certain turfs(depending on what your using it for) because having to call Entered() and check every step will cause a lot of delay. Explain a little more on what this is for?
|
In response to Derekjeterisgod
|
|
I want it so if the turfs air level is less than 50 the mob will lose HP.
|
In response to Revojake
|
|
Ok, I got it so if they enter an area without air they lose HP. But how do I make it so for every second they are in they lose more HP?
|
In response to Revojake
|
|
You could make a proc that runs while the air in src.loc is < than the acceptable amount of oxygen or air. Then call it again next time he/she enters another turf without enough air...
Just an idea. -KirbyAllStar |
Try using airflow regions, rather than each individual turn. Then use datums to denote breaches between regions.
That much, you will have to figure out on your own. I spent over a year to figure out this method, as opposed to a turf-by-turf method. As for updating, and dividing regions, I'll say this, it's easier than it seems. |
In response to KirbyAllStar
|
|
turf |
In response to Revojake
|
|
I would probably work with areas, that way you enter them less often, but thats up to you.
mob/Login() You should call air() after you locate the players mob on a map. I just woke up but I think that works. -KirbyAllStar |
In response to KirbyAllStar
|
|
um i think i got a idea
mob/var/air=100 //100 air i think thats it, dunno |
In response to Neo Shinryu
|
|
mob/Login() That should work... -KirbyAllStar |
In response to KirbyAllStar
|
|
I already have mine working, thanks anyway.
|