VictorFarbau 0 Posted March 3, 2007 I noticed that I did not trigger a script in one of my missions while driving through the triggerzone with one of the new motorcycles (M1030, TT650). I did a quick test with the "nearestObjects" function and saw that the bikes are not listed in there I looked at the config.cpp of the bikes and they are config class "Car" so the below example should work, right? Config bug? <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _xlist = nearestObjects [getpos player, ["Car","Tank", "Man"], 100]; 1. Me and a motorcycle on the map: _xlist = [WEST 1-1-A:1 (Victor)] 2. Me sitting on the same motorcycle: _xlist = [] 3. Me, a Skoda and a motorcycle: [WEST 1-1-A:1 (Victor),12c3e804# 5168: skodovka_blue.p3d] The odd thing is that the enemy AI can still detect the player and will start firing at him. But I am invisible to the script function "nearestObjects". Regards, Victor Share this post Link to post Share on other sites
DnA 5154 Posted March 10, 2007 Quote[/b] ]I looked at the config.cpp of the bikes and they are config class "Car" so the below example should work, right? They are actually of class "Motorcycle", so try that class or one of its parents Share this post Link to post Share on other sites
Planck 1 Posted March 10, 2007 Indeed, why did you think Motorcycle was under class "Car"? It was never the case, not even in OFP. As DnA says just try "Motorcycle" and it should work fine, next class up from that is "LandVehicle", which "Car" also inherits from. Planck Share this post Link to post Share on other sites