View Issue Details

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

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.

Activities

Inspirator

2014-10-04 16:17

viewer   ~~0022136

Last edited: 2014-10-04 16:37

View 17 revisions

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)
setTimer(function()setElementPosition(localPlayer,x,y+800,z)end,1000,1)

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.

einheit-101

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?

Inspirator

2014-10-04 17:25

viewer   ~~0022139

Last edited: 2014-10-04 18:25

View 8 revisions

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.

einheit-101

2014-10-21 11:52

reporter   ~~0022192

Last edited: 2014-10-21 11:58

View 2 revisions

Fixed in rev. 6892, tested and works great.

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

Inspirator

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 http://i.imgur.com/Ex1HeuB.jpg

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.

einheit-101

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?

Inspirator

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.

Inspirator

2014-10-26 20:06

viewer   ~~0022233

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

lopezloo

2014-11-23 22:36

developer   ~~0022582

Resolved in https://code.google.com/p/mtasa-blue/source/detail?r=6892 & https://code.google.com/p/mtasa-blue/source/detail?r=6896

Issue History

Date Modified Username Field Change