I didn't know where to search for so I decided to start a topic for my question.
What i want to know is if it is possible to create for example five different routes which are ending at the same place and then let the bot chose one of the five routes.
Waypoint 1 -- Chose Route A = 20%, Route B = 20%, Route C = 20%, Route D = 20%, Route E = 20%
Each time you call math.random it generates a new number so, to check it against a few values, you will have to save it first. And I would use tags as well.
local rnd = math.random(5)
if rnd == 1 then
__WPL:setWaypointIndex(__WPL:findWaypointTag("path1"))
elseif rnd == 2 then
__WPL:setWaypointIndex(__WPL:findWaypointTag("path2"))
elseif rnd == 3 then
__WPL:setWaypointIndex(__WPL:findWaypointTag("path3"))
elseif rnd == 4 then
__WPL:setWaypointIndex(__WPL:findWaypointTag("path4"))
else
__WPL:setWaypointIndex(__WPL:findWaypointTag("path5"))
end
Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.