Page MenuHomeFeedback Tracker

CreateVehicle is not creating the vehicle at the correct position while in water
Closed, ResolvedPublic


Using CreateVehicle has no issue on land, but will always create objects at the wrong position when used over water. It is really easy to reproduce.

This issue will make the creation of mission over water really difficult. I also notice that GetMarkerPos, SetPos and domove seems also affected. Briefly the position seems offset on the water.


Legacy ID
No Bug
Steps To Reproduce
  1. Create a riffleman on land.
  2. In its init box, enter: Zodiac = "B_Assaultboat" createvehicle [(getpos player select 0), (getpos player select 1)+1, (getpos player select 2)]
  3. Preview the game, you will notice that the boat is right beside the player.
  4. Now go back in the editor and just move the player in the water.
  5. Preview the game, you will notive that the boat is something like 25 meters from the player.
Additional Information

I tried playing with the Z axis, thinking that the wave could block the creation of the object at the desired position. But with no luck.

Event Timeline

frag edited Steps To Reproduce. (Show Details)Mar 15 2013, 5:02 AM
frag edited Additional Information. (Show Details)
frag set Category to Scripting.
frag set Reproducibility to Always.
frag set Severity to Major.
frag set Resolution to No Bug.
frag set Legacy ID to 3679847277.May 7 2016, 12:38 PM
frag added a subscriber: frag.
frag added a comment.Mar 18 2013, 3:23 AM

I just noticed that it is the case only if there is big waves (My setting is at Wave 90). If you do the call close to shore it will be alright. If you do it far to from the shore (where the waves are big) ... then the boat will appear at the wrong position.

This issue is more a bug in your own programming, than a bug in the script functions.

In order for a vehicle to be created EXACTLY at the position specified, you need to use "createvehicle [array]".

With that, you can use the 'special' "CAN_COLLIDE", which will spawn the vehicle at the exact given position.

As pointed out by Radioman, not a bug.