View Issue Details

IDProjectCategoryView StatusLast Update
0002565Multi Theft Auto : San AndreasScriptingpublic2007-09-28 16:08
ReporterLucif3rAssigned ToJax 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Versionblue_sa.r2.a12 
Target VersionFixed in Versionmtasadm_v1.0-dp1 
Summary0002565: stopObject() doesnt really stop the moving object.
Description

As title says, stopObject doesnt really stop the moving object.
The visuall object do indeed stop moving, but the coords are still changing untill it has reached its destination.

This bug prevents us/me from stopping an objects movement, and then resume it later on.

This is the code i use (well, part of it...):

function testTheFlag ( source )
local x, y, z = getElementPosition(source)
flag = createObject ( 11245, x + 4.5, y, z + 8, 0, 290, 0 )
lowerFlag = createColCircle ( x +4, y, z, 2 )
addEventHandler ("onColShapeHit", lowerFlag, lowerTheFlag)
addEventHandler ("onColShapeLeave", lowerFlag, stopTheFlag)
end
addCommandHandler ("flag", testTheFlag)

function lowerTheFlag ( source )
local x1, y1, z1 = getElementPosition(flag)
local z2 = z1 -14
setTimer (pos, 1000, 10, source )
moveObject ( flag, 10000, x + 0.5, y, z2 )
end
function pos ( source )
local x1, y1, z1 = getElementPosition(flag)
outputChatBox (""..z1.."")
end
function stopTheFlag ( source )
stopObject ( flag )
end

so as u can see from the script, the flag is ment to lower when u enter the colshape, and stop when u leave it.
The timer which calls the "pos" function outouts the flag's Z-coord ones a sec.
The Z-coord keeps lowering itself even if ure not in the colshape.

Btw, for a better testscript, look at BFTEST on tweaks FTP.

edit: since im such a nice guy, i recorded a video for you.
You can clearly see that the z-coord keeps changing, alltho the flag has stopped.
You can also see the flag instantly moving to the "real" position when i reenter the colshape, instead of continue to move down nice and smooth.

video: http://lucif3r.no-ip.org/objectbug.wmv

edit2: this is a SERVER script

TagsNo tags attached.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change