ID:179012
 
is there a way to make it so something just happens once with out var, for ex.
turf/thingy
Enter()
//do stuff but only the first time the person passes by.
Well, what you are essentially talking about is a binary check. The easiest way to do this would be to use a var to track whether the event has occurred (TRUE) or not (FALSE). However, if you for some reason have an aversion to vars, there is no reason why you couldn't use another method (actually there are a number of reasons, efficiency and memory usage being prime). For example you could check the mob's contents to see if the have a certain obj, if not do the effect and create the obj in the mob's contents. Or you could check the mob type and then create a new mob, switch mob keys, then del the old mob. Or do the same with the turf.

Without knowing more specifically what you wish to do and why you don't wish to use vars it is hard to recommend a solution.

-James
In response to Jmurph
ok well more or less i just want it so when someone walks over a tile its does something, but only once and never again for that char, but it can do it again for other players.
In response to Scoobert
Two easy ways to do this:
1) Track within the mob.
mob
var/triggered // the var to see if this mob has triggered the event
turf
Entered(mob/M)
..()
if(!M.triggered) // Have they done it before?
//do whatever
M.triggered = TRUE // Now they have!

2) Track by turf
turf
var/list/players_trigged[0] // List of mobs that have done it
Entered(mob/M)
..()
if(!players_trigged.Find(M)) // Is this mob on the list?
// do whatever
players_trigged += M // Is now!

-James
In response to Jmurph
hum ok looks like thoughs will work