demojoel Posted April 10, 2012 Posted April 10, 2012 I'm testing the function on the SF bridge, I know how to delete objects one by one, but I'd like to delete the whole bridge in one go, I did it once, but I can't remember how to do it again. The Function so far: (Some parts of the code might not even be needed) function removeobject() removeWorldModel(10821, 2000, -1292.48046875, 938.3876953125, 52.886108398438) -- Bridge Test end addEventHandler ("onResourceStart", getResourceRootElement(getThisResource()), removeobject) for i=10821,10000 do removeWorldModel(i,2000,-1292.48046875, 938.3876953125, 52.886108398438) end function restoreall() restoreAllWorldModels() end addCommandHandler("rawo", restoreall)
Jaysds1 Posted April 10, 2012 Posted April 10, 2012 for i=10821,10000 do removeWorldModel(i,2000,-1292.48046875, 938.3876953125, 52.886108398438) end Why did you put this? You already got the bridge model and deleted it on resource start.
demojoel Posted April 10, 2012 Author Posted April 10, 2012 I'm not sure, function removeobject() removeWorldModel(10821, 2000, -1292.48046875, 938.3876953125, 52.886108398438) -- Bridge Test end addEventHandler ("onResourceStart", getResourceRootElement(getThisResource()), removeobject) That doesn't work, the bridge isn't removing.
myonlake Posted April 10, 2012 Posted April 10, 2012 You need to go away from the position. And you also need to delete the LOD object.
Jaysds1 Posted April 10, 2012 Posted April 10, 2012 (edited) anyways, try this: addEventHandler ("onResourceStart",resourceRoot, function() removeWorldModel(10821, 2000, -1292.48046875, 938.3876953125, 52.886108398438) for i=10821,10000 do removeWorldModel(i,2000,-1292.48046875, 938.3876953125, 52.886108398438) end end) function restoreall() restoreAllWorldModels() end addCommandHandler("rawo", restoreall) Edited April 10, 2012 by Guest
demojoel Posted April 10, 2012 Author Posted April 10, 2012 It looks like it deletes part of the bridge but the texture is still there, i might need to add the LOD object.
Jaysds1 Posted April 10, 2012 Posted April 10, 2012 Oh, now I know why you wrote the script like that... Copy the script again, i've edited it
Jaysds1 Posted April 10, 2012 Posted April 10, 2012 hmm I don't know what to do... try what myonlake said
Jaysds1 Posted April 10, 2012 Posted April 10, 2012 Will do, thanks for the help anyway Np, I'm trying it on my server right now, and I can't get rid of it
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now