PDA

View Full Version : Randomize waypoints?



ulisbubo
12-14-2015, 11:07 PM
does any1 know how to do randomize waypoints? scripts/walker.

for example 2 stands:
Stand (32462, 32111, 8)
Stand ( 32477, 32101, 8)

viser14
12-15-2015, 12:18 AM
unless you are trying to stand N/E/S/W then just use nodes, they automatically randomize.

ulisbubo
12-15-2015, 08:58 AM
when i used nodes bot dont do anyth.

dinmamma
12-15-2015, 05:44 PM
This is one way of doing it (the more waypoints the harder):
Create a label named "Path1".
Make the waypoints.
Create label "Randomize" at the end.
Create label named "Path2".
Here you can make another round of waypoints.
Create label named "Randomize" at the end.

Create a lua script which u will run with this setting:



registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")
function onWalkerSelectLabel(labelName)
if (labelName == "Randomize") then
gotoLabel("Path"..(math.random(1,2)).."")
end
end


This script will randomize between Path1 and Path2, you can change the "2" in the script to any number of paths you would like to make.

With some imagination you could trigger the script between some ordinary waypoints, so you can randomize for example just which step on the stairs the bot will take, if it's a double or tripple stair.

ulisbubo
12-15-2015, 11:12 PM
]Ty for helping mate BUT Still sth is wrong look at the screen, what im doing wrong:

krille09
12-15-2015, 11:32 PM
nono your doing it wrong...

1 Randomize Label only

"Randomize"
"Path1"
Stand etc...
"Path2"
Stand etc...

Jontor
12-16-2015, 07:44 AM
You can use vertical/horizontal stands + nodes are randomized by default ( 3x3 area check )

ulisbubo
12-16-2015, 10:09 AM
:( 1.i want sth like this: bot chooing 1 of 3 path1 stand and then he choosing 1 of 3 path2 stands

2. vertical and horizontal stands didnt works.

ulisbubo
12-16-2015, 11:43 PM
refresh

viser14
12-17-2015, 01:59 AM
just to be clear, you do not use nodes in your script? at all?

ulisbubo
12-17-2015, 08:02 AM
when i use nodes instead stands walker dont moveing