adamwalker Apprentice
Joined: 12 Mar 2005 Posts: 195
|
Posted: Wed Aug 23, 2006 11:14 am
Problem with laggy trigger |
Code: |
#var locating {}
#var room2find {}
#var found_rooms {}
#var numberrooms {}
locating = "%1"
room2find = %replace( %2, ', %)
found_rooms = %MAPQUERY( Name LIKE '%@room2find%')
@isnullrooms = %null( @found_rooms)
currentroom = %item( @found_rooms , 1)
numberrooms = %numitems( @found_rooms)
#if (@isnullrooms = 1) {#show %ansi( bold, red)No results Found. %ansi( magenta)Area not mapped? Try manual search} {#SHOW %ansi( bold, magenta)Results:%ansi( white)~(%numitems( @found_rooms)~) %ansi( bold, red)WALKME to walk rooms.} |
My problem is that this trigger code can be periodically laggy. often upto a 10 second pause in zmud before it continues. almost asif a #wait has been used.anyone know how i could improve it?
its designed to match room name from a trigger to the map then return the room number tc |
|