ID:1752404
 
(See the best response by Kaiochao.)
Just out of curiosity, should I be using tmp when creating projectiles?

var/obj/L=new/obj/Knife(loc)
L.owner=src
walk(L,dir)

As Opposed To

var/obj/tmp/L=new/obj/Knife(loc)
L.owner=src
walk(L,dir)

The function of knife is just to do damage when it collides with a player. Would tacking on the tmp at the end do anything? The knife would be true for no longer than 1.5 seconds, if that.
Short answer is no. tmp is used to indicate whether a variable should automatically be saved or not.

So
mob/var/tmp/health

Means that when you call mob.Write() it will ignore health when saving the mob to a savefile.
Okay, consider the following subroutine:
damage()
for(var/mob/M in oview(2))
if(faction==M.faction)continue
var/tmp/damage=Strength*0.2
M.dmgchanges(src,1)
M.damage(damage)
M.death(usr)


Would the tmp on the damage var be useful here? Or does it only apply to mob/vars? Apologies if this is coming off as a stupid question, I've been ignoring tmp for a long time, and want to go back and put it everywhere it needs to be

In response to SinfulPhoenix
Best response
tmp is used by savefiles and issaved() only. It has no other effect.

When you save an object to a savefile (with object.Write(savefile) or savefile << object), all of its savable variables are automatically written to the file. Declaring a variable as tmp makes it non-savable.

And no, it's not just for mob variables. All datums, which have variables, can be saved.
One last question. Saving as least much as possible is the right way to go, correct?
In response to SinfulPhoenix
Save according to your game's design.