Done!
The raft hits the course correctly and stops when colliding with the bridge.
I decided to change the focus of the case, at least until Reloaded expose new commands that can be used to get what I want.
new approach
a- The raft has to go from start point to end point.
b-The raft should stop moving when it reaches the end point. (bridge)
c-The raft should move only when the player is on board.
d- The idea is to transport the player from point A to point B and vice versa.
Point D is giving me problems, I do not understand that the player falls under the raft when he climbed aboard.
You can see the problem at the end of the video below.
Script that reliza path from Point A to Point B, and stops.
-- LUA Script - precede every function and global member with lowercase name of script + '_main'
-- Raft crossing the river - (and g_Entity[e]['plrinzone']==1) fail
function balsa_init(e)
GravityOff(e)
CollisionOn(e)
StartTimer(e)
end
function balsa_main(e)
g_PlayerPosX=g_Entity[e]['x']
--g_PlayerPosY=g_Entity[e]['y']
g_PlayerPosZ=g_Entity[e]['z']
GravityOff(e)
CollisionOn(e)
ModulateSpeed(e,100)
ntimer=GetTimer(e)
Prompt(ntimer)
if ntimer<49200 then
MoveForward(e, 100)
else
IsInmobile=1
end
end
In FPS Classic, you can associate the player with antiGravitPlatform, but in Reloaded Lua, does not find any command, to relize this feature.
That said, we have to wait for better times.
3com