User Follow Path Package
This is a fairly straight forward package that allows a user to walk between a pre-determined set of entities/locators without user input.
To use it, add the User Follow Path script folder to the user.
Next, add a Path Template to the world.
The path template requires 1 or more entities to move between, and a camera. The camera is required to prevent the user looking around, breaking the movement.
An example properties panel looks like this:
The onReachCheckpoint
and onLeaveCheckpoint
events are called within a schedule, with user
and index
parameters. The user
property is the user that’s currently following the page, and the index
property corresponds to the applicable checkpoint.
Due to the fact the events are called in a schedule, you can use Wait
inside of the event handlers. For example, in Babel Builders, the HandleReachedCheckpoint
function looks like this:
function OutfitterScript:HandleReachedCheckpoint(user, index)
if index == 2 then
self:HandleInside(user)
elseif index == 3 then
self:HandleExit()
end
end
function OutfitterScript:HandleInside(user)
-- [[
snip
]]--
Wait(3)
end
When the user reaches checkpoint 2, they will wait there for 3 seconds due to the Wait
call inside HandleInside
.
There is also a demo template inside the package that you can place to get a grip of things.
Demo: - YouTube