Pirin 0 Posted May 11, 2008 So, I've seen that you can use XEH to assign eventhandlers only to specific types of vehicles or objects. However, can you also limit eventhandlers to only specific positions within a vehicle? As in, if you get in via a driver spot you get options, but gunners don't? Surely you must be able to, since I've seen different spots with different options, I'm just not seeing how to do that. Along with that, how can you add actions to just that position? I've added an option to the vehicle, but it's available from outside as long as someone's in the driver position. Thanks for any help! I haven't found a tutorial yet that explains this kind of thing. Share this post Link to post Share on other sites
dr_eyeball 16 Posted May 11, 2008 I doubt XEH covers anything to do with your requirements. You can use a 'getin' EH and then addActions to the vehicle based on the seat you entered (driver, gunner, commmander, cargo). You would also need a 'getout' EH to remove the actions. However, afaik, there is no clean way (eg: EH) to detect when the player changes seats while inside the vehicle already. In that case, you could probably setup a loop to detect your position periodically, then when it changes, remove the old actions and add the new actions. Share this post Link to post Share on other sites
UNN 0 Posted May 12, 2008 Quote[/b] ]You can use a 'getin' EH and then addActions to the vehicle based on the seat you entered (driver, gunner, commmander, cargo).You would also need a 'getout' EH to remove the actions. As Dr_Eyeball said the parameters passed to the get in and out events tell you what position is being used. But I'm sure XEH will pass those parameters by default, but there may be some quirks with additional turrets? I haven't looked. Quote[/b] ]Along with that, how can you add actions to just that position? Â I've added an option to the vehicle, but it's available from outside as long as someone's in the driver position. There are two ways, either using user actions defined in an addons configs or managing them with scripts. Scripts are much more complex, first you have to grab all the relevant info. Turret hierarchy, Position selection name e.t.c Then use commands like selectionPosition, modelToWorld and distance e.tc. To decide if you want to display actions. Share this post Link to post Share on other sites