ID:261397
 
usr.gold-=25
usr << "Let me put those on for you"
usr.overlays += 'offroad tires.dmi'
usr.sight = 0


i want it so grass changes from density 1 to density 0. Only if you have the tires on.
Try this:
 usr.gold-=25
usr << "Let me put those on for you"
usr.overlays += 'offroad tires.dmi'
usr.sight = 0
grass.density = 0


-Non-PC
you would need like
enter()
if(usr.tires=1/"yes"/"y")//what ever you do to tell it has tires
densety=0
else
densety=1

plz dont copy and paist that kus it wont work im just showing you how.
Knuckles skater wrote:
usr.gold-=25
usr << "Let me put those on for you"
usr.overlays += 'offroad tires.dmi'
usr.sight = 0


i want it so grass changes from density 1 to density 0. Only if you have the tires on.

Since this would affect all players, and you'd need to loop through every grass turf to change its density, I suggest this instead:
turf/grass
...

Enter(atom/movable/A)
if(istype(A,/mob))
var/mob/M=A // type-casting so we don't need to use :
if(!M.offroad_tires) return 0 // can't drive over grass
return ..()

Then all you need is a mob.offroad_tires var, which you can set to 1 when the player picks up tires.

Lummox JR