View Issue Details

IDProjectCategoryView StatusLast Update
0008260Multi Theft Auto : San AndreasScriptingpublic2018-07-21 18:48
ReporterlopezlooAssigned ToNecktrox 
PrioritylowSeverityfeatureReproducibilityN/A
Status resolvedResolutionfixed 
Product Version1.3.5 
Target VersionFixed in Version1.5.6 
Summary0008260: [Request] Possibility to clear all fires
Description

Just a function to destroy all fires (created by explosions, molotovs, fire extinguisher etc.). I think MTA already do this in some situations so adding this shouldn't be hard.

TagsNo tags attached.

Activities

lopezloo

2014-07-31 08:32

developer   ~~0021550

Also would be nice to clear fires on specific position, like removeWorldModel:
clearFires(x, y, z, radius) (+ interior?)

RuuN-

2014-07-31 09:32

viewer   ~~0021553

You can try this:

function destroyAllEffects()
for i, effect in ipairs (getElementsByType("effect")) do
if (isElement(effect)) then
destroyElement(effect)
end
end
end

lopezloo

2014-07-31 10:14

developer   ~~0021554

I don't mean effect. Fire created by explosion isn't element.

socialz

2014-08-01 06:26

viewer   ~~0021600

Last edited: 2014-08-01 06:31

View 4 revisions

Master relation: #004924

As a temporary workaround hack you could always use a GTA fire effect and when the element is close enough to the element it would set the player or pedestrian on fire, or similarly vehicles or so. This is a pretty hacky way of doing it, but as always, it works! You can remove GTA effects, so this gives you that advantage. Original fire was meant to be spreading and natural, and not able to be managed by the game. GTA did use fire effects in various situations as well.

@RuuN-: isElement( ) is unnecessary when iterating over a native element table. You should always be able to trust getElementsByType( ) giving you a true list of all real-time elements in-game. Such check is only required when a handler is delayed, for example inside of a timer. An element could potentially have been removed from the world during this delay, and would be recommended to use isElement( ), but normally the speed it iterates over a list of elements is quite hasty.

bmazoka

2014-08-01 06:34

viewer   ~~0021602

Would also be nice to see createFire return a element so that it can be controlled. But I wasn't aware of what socialz said about how the whole purpose of the fire is to be completely uncontrolled by the server.

lopezloo

2014-08-01 10:32

developer   ~~0021603

Last edited: 2014-08-01 10:32

View 2 revisions

I know fire isn't synced, for the same reason I want this function (clientside guys). I'm working on round based gamemode and I just want clear fires when round is starting.

It's annoying when some players see fire from explosions and can burn from previous round fire and newly connected players can't. Own fire system based on FX is perhaps some solution but I proposed this func because MTA already can do it (ExtinguishAllFires in CFireManager).

socialz

2014-08-01 13:03

viewer   ~~0021607

@bmazoka: It is not exactly what I meant. I just meant, that fire was supposed to be freely spreading instead of being fully manageable as for what goes to things like setElementPosition( ) and such. Of course these can be done if the fire was an element in the first place, but as it is not, there is not much you can do.

myonlake

2018-07-21 18:43

updater   ~~0026767

CrosRoad95 added extinguishFireInRadius in https://github.com/multitheftauto/mtasa-blue/pull/207 which was later merged in https://github.com/multitheftauto/mtasa-blue/commit/40118f7875516304ff585c4c9ef360a7e887ca41

Octalype added extinguishAllFires in https://github.com/multitheftauto/mtasa-blue/commit/7838b7b028f87248a7cd37f82fe1241bbc393ebc

Issue History

Date Modified Username Field Change