Summary
WIP
Discord: diegocardoso86
Description
PT-BR
Este script cria um trigger que, quando o jogador entra, verifica se já existe no mapa um veí**** usando o mesmo prefab configurado. Ele faz uma busca global pelo nome do arquivo do prefab (.et). Se já existir um veí**** com aquele prefab, o trigger não faz nada. Isso também vale para veículos destruídos: se o veí**** estiver destruído, mas ainda existir no mapa como entidade, o trigger não spawnará outro. Quando o próprio sistema do Arma Reforger apagar essa entidade destruída, o trigger voltará a spawnar um novo veí**** quando um jogador entrar nele.
Cada trigger gerencia apenas um veí**** baseado no nome do prefab. Por isso, cada veí**** deve ter um arquivo .et com nome único. Se dois triggers usarem o mesmo prefab, ambos vão detectar e controlar o mesmo carro, pois o sistema entende que aquele prefab representa um único veí**** no mapa inteiro.
Funciona normalmente em servidores com ou sem persistência.
Este mod é distribuído sob a Licença APL-SA - você pode modificar e redistribuir livremente, desde que mantenha os créditos originais e publique sob a mesma licença.
EN
This script creates a trigger that, when a player enters it, checks if there is already a vehicle in the map using the same configured prefab. It performs a global scan using the prefab’s filename (.et). If a vehicle with that prefab already exists, the trigger does nothing. This also applies to destroyed vehicles: if the vehicle is destroyed but still exists as an entity in the world, the trigger will not spawn another one. When Arma Reforger’s system eventually removes that destroyed entity, the trigger will spawn a new vehicle again when a player enters it.
Each trigger manages only one vehicle based on the prefab filename. For this reason, each vehicle must have a unique .et prefab name. If two triggers use the same prefab, both will detect and manage the same vehicle, because the system treats that prefab as a single vehicle across the entire map.
It works normally on servers with or without persistence.
This mod is distributed under the APL-SA License - you are free to modify and redistribute it as long as you keep the original credits and release it undhe same license.
License
Arma Public License Share Alike (APL-SA)