The problem is my turf code is all cluttered up, because, for each turf i have put Enter() so when u enter the turf anything that isnt water, if your swimming then u stop swimming.
Now is there a way to make this all one code block.
I have tried if(T == "water"), this doesnt work, i have also tried if(isturf(/turf/terrain/water)) again this doesnt work.
i have,
turf/terrain/Enter(atom/movable/A)
//code here
I want to make it so,
turf/terrain/Enter(atom/movable/A)
if(T == "water")
//blahhhhh
else
return 1
Is this the right way to go about it?
Thanks,
Farkas
Actually you should use istype to check if the turf is of teh type water(if that's how you defined the water turfs) like so:
of course this should be in the Move() proc for mobs. That way it only has to be in one place. You can also at that time make it so you need something to swim, if not the Move() proc returns 0(or needing wings to fly or what ever)