Page 3 of 4
Posted: Tue Jun 14, 2005 1:34 pm
by DigitalMocking
Here's a little something I wrote to get the hang of advpath, the usage is simple:
/startrec <filename> - Start Recording a path file.
/stoprec - Stop Recording
/playfile <filename> - Playback a recorded path
Code: Select all
#event PlayFile "[MQ2] playfile #1#"
#include advpath.inc
Sub Main
/call InitAPFVars 1 15 20
/squelch /alias /startrec /echo record
/squelch /alias /stoprec /echo stop
/squelch /alias /playfile /echo playfile
:Main_Loop
/call AdvPathPoll
/delay 5
/doevents
/goto :Main_Loop
/return
Sub WaitTilThere
:LoopTilThere
/if (${PathingFlag}==1) {
/call AdvPathPoll
/delay 1
/doevents
/goto :LoopTilThere
}
/return
Sub Event_PlayFile(string Line, string PathFile)
/call PlayFunction "${PathFile} 1 nf nopp noz"
/call WaitTilThere
/return
Posted: Wed Aug 31, 2005 9:35 pm
by KokoNutz
Something strange is going on with my implementation of this snippet and wanted to get another set of eyes on it to see if I'm doing something wrong...
Code: Select all
#Include advpath.inc
Sub Main
/call InitAPFVars 1 15 20
:MainLoop
/if (${Zone.Name.Equal[Some Zone]}) /call MoveToPlace
<bunch of my code>
/goto :MainLoop
/return
Sub MoveToPlace
/call PlayFunction "gosomewhere 1 cf pp noz"
/call WaitTilThere
/target Soandso
/delay 3s
/say blah blah blah
/call PlayFunction "gosomewhere 1 cr pp noz"
/call WaitTilThere
/return
Sub WaitTilThere
:LoopTilThere
/if (${PathingFlag}==1) {
/call AdvPathPoll
/delay 0
/doevents
/goto :LoopTilThere
}
/return
The problem is this: It works great the first time it detects that it is not in the correct zone, but after the first time, it runs like 2 inches, stops, turns around and runs back to the zone-out point and exits back to the main loop. Why is it only working the first time? Is there some variable that is not being reset within AdvPath?
Thanks,
-KoKo
Posted: Wed Aug 31, 2005 10:52 pm
by KokoNutz
Nevermind... just put a /doevents flush before each /PlayFunction call and it fixed the problem. Still not sure what was happening, but it works now so bleh...
Posted: Thu Sep 01, 2005 8:54 pm
by ml2517
Are you sure you wanted to use the "pp" parameter? That is ping pong. It sounds like you wanted to walk somewhere.... do something... then walk back to where you started right? If that is the case try exactly what you have now but use nopp.
Posted: Thu Sep 01, 2005 9:23 pm
by KokoNutz
Yeah I had it as "nopp" but I had changed it while trying to figure out specifically what was causing the problem. I had just made that change when I cut & pasted here, but changed it back as soon as I went back to testing. So yeah I noticed that and unfortunately it wasn't the problem
Thanks,
-KoKo
Posted: Tue Nov 01, 2005 9:13 pm
by Stewee
I have used DigitalMocking's script in combination with advpath to record and playback files. This works really well for me but I am having a problem with a door in the area I am trying to navigate. There is an intricate looking section in this script to open doors that doesnt seem to work for me. It targets the door but it does not open it. The rest of the obstacle avoidance works fine. I threw some use center screen keypresses into the obstacle avoidance section as a workaround but it is not 100 percent. If anyone knows what I could change to make this more reliable I would appreciate it.
Thanks
Stewee
Posted: Wed Nov 02, 2005 3:44 am
by Omnictrl
Heh, I think I know that door.
I had to separate into two paths, one leading to the door, and the remainder (by recording them separately) - and putting a:
Sub openthisdamndoor
/face locbehinddoor
/keypress USE
/return
I tried to fix it by checking whether or not the door is open (${Switch.Open} iirc) and when failed the first time I had code to face left and right (30 degrees) and up to center and keep trying to open it, but it just didn't work very well.
Good luck on a better fix.
Posted: Wed Nov 02, 2005 2:18 pm
by Wink-
What I do for doors is /doortarget <doorname>, /face, /stick x, /keypress u
Works good for doors, clicking on zones.
Just need to play with the stick distance that you need.
Posted: Wed Nov 02, 2005 2:22 pm
by fearless
yeah . . . cause having a door on target isn't noticeable . . .
Posted: Fri Nov 18, 2005 12:10 pm
by toomanynames
You know funny thing is, and I've not tested the lastest MQ down load but the 11/17 one, advpath didn't target "bad things" anymore.
Maybe just quinkydink or perhaps DKAA found / fixed it but I didn't change advpath.inc, played a few LDON, and was checking on targeting doors and such, and it wasn't.
/shrug
Posted: Fri Jul 07, 2006 2:19 am
by JimJohnson
When Recording a Pathfile that requires zoning do you need to actually zone or do you just stop before the zone? Having issues with this not actually zoning me every time and firing the second playbackfile before I zone.
Posted: Fri Jul 07, 2006 9:00 am
by someone_orsomething
When Recording a Pathfile that requires zoning do you need to actually zone or do you just stop before the zone? Having issues with this not actually zoning me every time and firing the second playbackfile before I zone.
When i do it i have it walk just before the zoneline then next line I put /keypress foward hold (this will make it zone) then next line i /call zoner. I also put a delay in there cause comp might lag
Hope this helps
trying
Posted: Mon Jul 31, 2006 5:40 pm
by Sephin
[deleted] cuz I got my chant.mac to work with this. Posting in forum.
Updated Product Website
Posted: Sat Jan 06, 2024 6:14 pm
by FrankJScott
Please try
Google before asking about
New Product Tips ac74_59
Recommended Merino Wool Site
Posted: Sun Jan 07, 2024 11:41 am
by FrankJScott
To the guy asking about best merino wool hunting base layer, lightweight merino base layer, minus33 base layers, mens merino base layer top, icebreaker bodyfit 150 women's, rapha men's merino base layer, pure merino wool thermals, mens 100 merino wool base layer, tencel base layer, merino thermal wear, smartwool bottom base layer, men's wool undershirts, bula wool base layer, merino wool thermals uniqlo, icebreaker merino oasis 200, hooded merino base layer, sherpa merino base layer, top rated merino wool base layer, meriwool midweight, merino wool long johns, I can vouch for this
merino wool base layers for best value merino wool base layer, smart wool base layers, icebreaker merino wool long underwear, smartwool merino 150 hoody, smartwool merino 250 leggings, redram merino wool base layer, smart wool layers, plus size merino wool base layer, tracksmith merino wool, sweaty betty merino base layer, icebreaker long underwear mens, women's intraknit merino 250 thermal bottom, smartwool thermals, helly hansen merino wool base layer mens, castelli merino base layer, haster alpaca base layer, crane merino thermals, women's merino 250 base layer bottom, woolx women's wool leggings, technicals merino base layer, also. See More
Excellent Merino Wool Info 8dec9a8