Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
Wreck1 setPos [(getPos player select 0),((getPos player select 1)+20),0];
FYI, getPosWorld is the fastest method of getting an object position.
Using the ATL[community.bistudio.com] tranform type, we keep Z at 0 because Z is relative to the positions terrain height.
Now, there are a couple ways that I know of moving the object X amount of meters from the player. In this type of situation, you could certainly make use of the BIS_fnc_findSafePos[community.bistudio.com] function. With this function, you define a center point, a space of distance you want the object to spawn within, and a quite useful set of remaining parameters. This will also prevent the object from unwantedly clipping through objects that are too close, unlike manually setting its position.
The other way is exactly as you provided above, but using setPosATL. You can manually add or subtract the amount to the players current position along the X and Y plane.
I'm simply adding an alternate method of achieving this to the thread incase you find it useful, or others who skim across here are looking for a similiar solution