Hey thanks alot bitmonster I'm a lot closer than I was when I asked the first question heres what ive done so far:
Code:
AddEventHandlerName(206, "", "ASTEvent")
function ASTEvent()
instring = tonumber(strfind(EventString, "%-.")) -- determine if direction was pressed
if instring then -- if direction do following
dir = tonumber(strsub(EventString, 1, instring-1)) -- dir = direction without pressure
if dir > 45 and dir <= 135 then -- is right?
direc = 1 -- direc = right = 1
elseif dir > 135 and dir <= 225 then -- is down?
direc = 2 -- direc = down = 2
elseif dir > 225 and dir <= 315 then -- is left?
direc = 3 -- direc = left = 3
elseif dir > 315 or dir <= 45 then -- is up?
direc = 0 -- direc = up = 0
else -- if error
direc = 900 -- direc = error = 900
end
end
end
I've got this all working properly, but I'm stuck again... I need to be able to execute a command in girder from this script and I'm assuming I do this by generating an event and then assigning this event to a command in girder.... but i have no idea how to generate the event. Any suggestions?
thanks ahead of time,
Jared