Jump to content
Sign in to follow this  
VictorFarbau

1.05: Motorcycle config  error?

Recommended Posts

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 huh.gif

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
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 smile_o.gif

Share this post


Link to post
Share on other sites

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×