
Originally Posted by
Nicolai1
Movement detector for all players would probably beeeee....
[highlight=e2]
@persist R:array N
interval(findUpdateRate())
findByType("player")
R = findToArray()
N = 0
while (N < R:count()) {
N++
if (R[N, entity]:velocity():length() > 1) {
print(R[N, entity]:name() + "has moved!")
}
}
[/highlight]
Untested, should probably work :3
Or you could use a for() loop. Much easier for this.
Code:
@persist R:array
interval(findUpdateRate())
findByType("player")
R = findToArray()
for (N = 1, R:count()) {
if (R[N, entity]:velocity():length() > 1) {
print(R[N, entity]:name() + "has moved!")
}
}
Bookmarks