COMMUNITY FORUM

Anyone know how to delete a trigger using LUA?

Forum Overview >> Farming Simulator 17

CategoryFarming Simulator 17
Created27.10.2016 01:11


Tristan Dow (Unknown) 27.10.2016 01:14
Hey everyone.
I have tried so many things different combinations and none of them seem to work.
from the LUADOC for FS17. It just says
function ShopTrigger:delete()
if g_currentMission:getIsClient() then
removeTrigger(self.triggerId);
g_currentMission:removeActivatableObject(self);
end;
but that isn't enough I know, but I can't seem to figure it out and no other scripts I find give any help at all. I have been stumping over this for hours.

and yes, I am new to LUA, but not programming. Maybe I am looking at it wrong or something.
any help would be appreciated.

Emil Drefers (Unknown) 27.10.2016 09:43
Hi,

basically "removeTrigger(id)" is all you need.
But eventually this block/line of code does not get called at all?
Check it with some more debug prints.

Also, if your script interfers with default scripts it might get a bit more tricky.

Cheers,
Emil


Note: Log in to post. Create a new account here.