Community Forum

TipTrigger - InitStaticObjectClass ?

Forum Overview >> Scripting

Created27.12.2017 14:55

Andre Nierhaus (Dimer24) 27.12.2017 14:55
Can I find out exactly how the ".lua" file should look like to register a Tiptrigger ?

I haved all lines from

The lines from the initPricingDynamics are missed.
Lines 417 to 548

I'm unsure about the first three lines

This tree lines from LS 15

TipTrigger2 = {};
TipTrigger2_mt = Class(TipTrigger2, Object);

InitStaticObjectClass(TipTrigger2, "TipTrigger2", ObjectIds.OBJECT_TIP_TRIGGER);

the third line produces an errror: attempt to call global 'InitStaticObjectClass' (a string value)

Thanks in advance for help

Andre Nierhaus (Dimer24) 27.12.2017 16:33

I believe that I have found the right entries:

TipTrigger2 = {};

local TipTrigger2_mt = Class(TipTrigger2, Object);

InitObjectClass(TipTrigger2, "TipTrigger2");

and the line 1127 g_onCreateUtil.addOnCreateFunction("TipTrigger2", TipTrigger2.onCreate);

Now I have the Problem, that I miss the entries from initPricingDynamics

Error: Running LUA method 'modOnCreate.TipTrigger2'.
C:/Users/andre/Documents/My Games/FarmingSimulator2017/mods/map_Hinterland_17/maps/Import/Scripts/TipTrigger2.lua:284: attempt to call method 'initPricingDynamics' (a nil value)

I hope someone can help me

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