I am attempting to add additional features to a silo mod by integrating Achimobil (Base and pallets) / braeven (bales) aPalletSilo scripts to it.
I have most of the integration work so far but I'm stuck at getting the player trigger to work. It appears that I have the correct entries in the XML files, modDesc is mapping to the scripts dir, the mod file has the correct entries and I have the id3mapping going to the correct node in the model. When testing the trigger point shows up but nothing happens when I approach it and attempt to interact with it. When I've checked the error logs I'm not seeing anything displayed there so I'm not sure if the scripts are not loading or if I have something else wrong. is there any way to see if the script is being loaded? I'm not sure quite where to go with troubleshooting this further.
Attempting to call script with player trigger
6 posts
Page 1 of 1
-
- Moderator
- Posts: 985
- Joined: Sun Jul 17, 2016 9:40 am
Re: Attempting to call script with player trigger
Check the collision mask of the trigger, it must be appropriate to detect the player.
Re: Attempting to call script with player trigger
Did you solve it? I need your help to do something similar
Re: Attempting to call script with player trigger
List of collision masks
CollisionFlag.DEFAULT = registerFlag(0, "DEFAULT", "The default bit", true)
CollisionFlag.STATIC_WORLD = registerFlag(1, "STATIC_WORLD", "Collision with terrain, terrainHeight and static objects", true)
CollisionFlag.STATIC_OBJECTS = registerFlag(3, "STATIC_OBJECTS", "Collision with static objects", true)
CollisionFlag.STATIC_OBJECT = registerFlag(4, "STATIC_OBJECT", "A static object", true)
CollisionFlag.AI_BLOCKING = registerFlag(5, "AI_BLOCKING", "Blocks the AI", true)
CollisionFlag.TERRAIN = registerFlag(8, "TERRAIN", "Collision with terrain", true)
CollisionFlag.TERRAIN_DELTA = registerFlag(9, "TERRAIN_DELTA", "Collision with terrain delta", true)
CollisionFlag.CAMERA_BLOCKING = registerFlag(10, "CAMERA_BLOCKING", "Blocks outdoor vehicle camera", true)
CollisionFlag.TREE = registerFlag(11, "TREE", "A tree", true)
CollisionFlag.DYNAMIC_OBJECT = registerFlag(12, "DYNAMIC_OBJECT", "A dynamic object", true)
CollisionFlag.VEHICLE = registerFlag(13, "VEHICLE", "A vehicle", true)
CollisionFlag.PLAYER = registerFlag(14, "PLAYER", "A player", true)
CollisionFlag.BLOCKED_BY_PLAYER = registerFlag(15, "BLOCKED_BY_PLAYER", "Object that's blocked by a player", true)
CollisionFlag.ANIMAL = registerFlag(16, "ANIMAL", "An animal", true)
CollisionFlag.ANIMAL_POSITIONING = registerFlag(17, "ANIMAL_POSITIONING", "An object where animals can walk on", true)
CollisionFlag.AI_DRIVABLE = registerFlag(18, "AI_DRIVABLE", "AI can drive over this node", true)
CollisionFlag.GROUND_TIP_BLOCKING = registerFlag(19, "GROUND_TIP_BLOCKING", "Bit to block the ground tipping at this position", true)
CollisionFlag.TRIGGER_PLAYER = registerFlag(20, "TRIGGER_PLAYER", "A trigger for players", true)
CollisionFlag.TRIGGER_VEHICLE = registerFlag(21, "TRIGGER_VEHICLE", "A trigger for vehicles!", true)
CollisionFlag.TRIGGER_DYNAMIC_OBJECT = registerFlag(24, "TRIGGER_DYNAMIC_OBJECT", "A dynamic object", true)
CollisionFlag.TRIGGER_TRAFFIC_VEHICLE_BLOCKING = registerFlag(25, "TRIGGER_TRAFFIC_VEHICLE_BLOCKING", "A trigger that blocks the traffic vehicles", true)
CollisionFlag.TRIGGER_FORK = registerFlag(27, "TRIGGER_FORK", "A trigger for fork object mounting", true)
CollisionFlag.TRIGGER_ANIMAL = registerFlag(28, "TRIGGER_ANIMAL", "A trigger for animals", true)
CollisionFlag.FILLABLE = registerFlag(30, "FILLABLE", "A fillable node. Used in trailers and unload triggers", true)
CollisionFlag.WATER = registerFlag(31, "WATER", "Collision of the water plane", true)
registerFlag(2, "STATIC_WORLD_WITHOUT_DELTA", "Deprecated in FS22: Do not use it anymore!", false)
registerFlag(6, "TRACTOR", "Deprecated in FS22: Do not use it anymore!", false)
registerFlag(7, "COMBINE", "Deprecated in FS22: Do not use it anymore!", false)
registerFlag(22, "TRIGGER_COMBINE", "Deprecated in FS22: Do not use it anymore!", false)
registerFlag(23, "TRIGGER_FILLABLE", "Deprecated in FS22: Do not use it anymore!", false)
registerFlag(26, "TRIGGER_CUTTER", "Deprecated in FS22: Do not use it anymore!", false)
Also check the sdk C:\Program Files (x86)\Farming Simulator 2022\sdk\debugger\gameSource.zip
unzip and go to dataS scripts Triggers for further info on triggers
CollisionFlag.DEFAULT = registerFlag(0, "DEFAULT", "The default bit", true)
CollisionFlag.STATIC_WORLD = registerFlag(1, "STATIC_WORLD", "Collision with terrain, terrainHeight and static objects", true)
CollisionFlag.STATIC_OBJECTS = registerFlag(3, "STATIC_OBJECTS", "Collision with static objects", true)
CollisionFlag.STATIC_OBJECT = registerFlag(4, "STATIC_OBJECT", "A static object", true)
CollisionFlag.AI_BLOCKING = registerFlag(5, "AI_BLOCKING", "Blocks the AI", true)
CollisionFlag.TERRAIN = registerFlag(8, "TERRAIN", "Collision with terrain", true)
CollisionFlag.TERRAIN_DELTA = registerFlag(9, "TERRAIN_DELTA", "Collision with terrain delta", true)
CollisionFlag.CAMERA_BLOCKING = registerFlag(10, "CAMERA_BLOCKING", "Blocks outdoor vehicle camera", true)
CollisionFlag.TREE = registerFlag(11, "TREE", "A tree", true)
CollisionFlag.DYNAMIC_OBJECT = registerFlag(12, "DYNAMIC_OBJECT", "A dynamic object", true)
CollisionFlag.VEHICLE = registerFlag(13, "VEHICLE", "A vehicle", true)
CollisionFlag.PLAYER = registerFlag(14, "PLAYER", "A player", true)
CollisionFlag.BLOCKED_BY_PLAYER = registerFlag(15, "BLOCKED_BY_PLAYER", "Object that's blocked by a player", true)
CollisionFlag.ANIMAL = registerFlag(16, "ANIMAL", "An animal", true)
CollisionFlag.ANIMAL_POSITIONING = registerFlag(17, "ANIMAL_POSITIONING", "An object where animals can walk on", true)
CollisionFlag.AI_DRIVABLE = registerFlag(18, "AI_DRIVABLE", "AI can drive over this node", true)
CollisionFlag.GROUND_TIP_BLOCKING = registerFlag(19, "GROUND_TIP_BLOCKING", "Bit to block the ground tipping at this position", true)
CollisionFlag.TRIGGER_PLAYER = registerFlag(20, "TRIGGER_PLAYER", "A trigger for players", true)
CollisionFlag.TRIGGER_VEHICLE = registerFlag(21, "TRIGGER_VEHICLE", "A trigger for vehicles!", true)
CollisionFlag.TRIGGER_DYNAMIC_OBJECT = registerFlag(24, "TRIGGER_DYNAMIC_OBJECT", "A dynamic object", true)
CollisionFlag.TRIGGER_TRAFFIC_VEHICLE_BLOCKING = registerFlag(25, "TRIGGER_TRAFFIC_VEHICLE_BLOCKING", "A trigger that blocks the traffic vehicles", true)
CollisionFlag.TRIGGER_FORK = registerFlag(27, "TRIGGER_FORK", "A trigger for fork object mounting", true)
CollisionFlag.TRIGGER_ANIMAL = registerFlag(28, "TRIGGER_ANIMAL", "A trigger for animals", true)
CollisionFlag.FILLABLE = registerFlag(30, "FILLABLE", "A fillable node. Used in trailers and unload triggers", true)
CollisionFlag.WATER = registerFlag(31, "WATER", "Collision of the water plane", true)
registerFlag(2, "STATIC_WORLD_WITHOUT_DELTA", "Deprecated in FS22: Do not use it anymore!", false)
registerFlag(6, "TRACTOR", "Deprecated in FS22: Do not use it anymore!", false)
registerFlag(7, "COMBINE", "Deprecated in FS22: Do not use it anymore!", false)
registerFlag(22, "TRIGGER_COMBINE", "Deprecated in FS22: Do not use it anymore!", false)
registerFlag(23, "TRIGGER_FILLABLE", "Deprecated in FS22: Do not use it anymore!", false)
registerFlag(26, "TRIGGER_CUTTER", "Deprecated in FS22: Do not use it anymore!", false)
Also check the sdk C:\Program Files (x86)\Farming Simulator 2022\sdk\debugger\gameSource.zip
unzip and go to dataS scripts Triggers for further info on triggers
Re: Attempting to call script with player trigger
TheSuBBie
Thanks again, youve been with me all the way with Forestry project.
I have read the SELLWOOD trigger in sdk/debugger line for line. I get it.
Do you know of just one map/mod where they’ve made custom trigger?
Thanks again, youve been with me all the way with Forestry project.
I have read the SELLWOOD trigger in sdk/debugger line for line. I get it.
Do you know of just one map/mod where they’ve made custom trigger?
Re: Attempting to call script with player trigger
I don't know of any offhand but you could check some of the forestry maps on modHub and other sites.
6 posts
Page 1 of 1