View Issue Details

IDProjectCategoryView StatusLast Update
0008566Multi Theft Auto : San AndreasScriptingpublic2014-11-24 00:46
Reportereinheit-101 Assigned Toccw  
Status resolvedResolutionfixed 
Target Version1.4.1Fixed in Version1.4.1 
Summary0008566: [Request] A way to adjust the draw distance of effects made by fxAdd...() or createEffect()

I am working with custom effects and i see that most of the scripted effects have an extremely low drawDistance. Some have only 2-3 Meters ("coke_puff") and others have more (like sparks).
It would be very nice to see an option for the draw distance.

Steps To Reproduce

function toggleS(weapon, ammo, ammoInClip, hx, hy, hz)
local eff = createEffect("coke_puff", hx, hy, hz)
setTimer(destroyElement, 2000, 1, eff)
addEventHandler("onClientPlayerWeaponFire", getRootElement(), toggleS)

--shoot at the ground directly in front of you. The smoke cloud appears.
--now shoot at an object in 10 meters distance or more. You will not see a cloud.

TagsNo tags attached.



2014-10-04 16:17

viewer   ~~0022136

Last edited: 2014-10-04 16:37

I noticed that if you create the effect at your position and then warp yourself like 800 meters away (with weather at 0) you can still see the effect for a few seconds.

Try this while in the sky or on top of a building or something
x,y,z = getElementPosition(localPlayer)
eff = createEffect("riot_smoke",x,y,z,-90,0,0)

Not that this is a solution or anything. Just showing you that in fact you can see the effect from a distance like that. The engine allows it.
It only seems to spawn/show up when the effect is near you if you get what I mean. With this said I do hope we'll have an option for draw distance.


2014-10-04 17:07

reporter   ~~0022138

So we have a workaround for this?
CreateEffect at Position of localPlayer then setElementPosition to the place where i want the effect?


2014-10-04 17:25

viewer   ~~0022139

Last edited: 2014-10-04 18:25

It's not a workaround or solution it's just an example to show that you can see them from a really high distance.

For example the smoke creates like 10 puffs of smoke over a period of 10 seconds or so. If you spawn it in front of you you can see only 1 puff of smoke then when you warp yourself 800 meters away you can still only see that 1 puff of smoke until it dies. You can't see the other 9 puffs because you weren't there when it spawned

What you said doesn't work. Already tried that.


2014-10-21 11:52

reporter   ~~0022192

Last edited: 2014-10-21 11:58

Fixed in rev. 6892, tested and works great.

€DIT: But it seems it has only been added for createEffect() and not for fxAdd...()


2014-10-26 19:18

viewer   ~~0022227

Comment by project member ccw808, Today (10 hours ago)
To what value? And why?

Infinite, or something much greater than 255. Check out this image of one of my maps

Say if I wanted to see a fire with some smoke near one of the small huts in the background, it'd need a much greater value than 255.


2014-10-26 19:22

reporter   ~~0022228

Maybe Eir will make such distances possible? Of course it is nice to have "no limits" but i think ccw has hit a GTA limit, otherwise he wouldn`t choose 255 meters just for fun?


2014-10-26 20:04

viewer   ~~0022232

Perhaps, but I know the engine allows you to see them at such distances. It just doesn't spawn/show up if you aren't near it at first. So the effect has to have send out the first "puff" of smoke then you can move as far away as you want and the effect will stay visible until that puff dies. If you want to see another puff of smoke appear then you'll have to go near it first. If you understand what I mean.


2014-10-26 20:06

viewer   ~~0022233

And this counts for any effect not just the smoke ones.


2014-11-23 22:36

developer   ~~0022582

Resolved in &

Issue History

Date Modified Username Field Change