Preview Video:
https://stream.spitz.onl/play/38
This framework can be used by everyone and in every mission to spawn AI, Vehicles, Objects, Triggers, and all sorts of prefabs dynamically via trigger or remote execution. Have fun making your missions!
- It does spawn and despawns on player contact just with hierarchy no naming
- It does add the waypoint automatically to the ai without naming them as in the example shown and only how in the example shown :D
- It does recreate the navmesh for all created env if wanted
- It does only spawn a percentage amount of the ai randomized if wanted
- It does respawn Ai after dying if wanted
- It does spawn Vehicles and Environment
- It can be called outside of the trigger function by script by simple calling Spawn() or Despawn()
- It does support 5 types of Waypoints: Patrol, Cycle, GetInNearest, Defend, Move
- It does support dynamic multi spawn by the count of players so you can adapt to how many players are there
The Example world is in worlds/CoopTestTerrain.ent
Code:
private RplComponent m_pRplComponent;
if(!m_pRplComponent)
{
m_pRplComponent = RplComponent.Cast(Owner.FindComponent(RplComponent));
}
if(m_pRplComponent.IsMaster())
{
NO_SCR_SpawnTrigger.Cast(GetWorld().FindEntityByName("Name of the Trigger")).Spawn();
}
Some default prefabs has disabled RplComponent on them or even no RplComponent. It looks like this:
Cause of that you have to do this steps if a prefab only spawns on the master:
- Clone it to you project
- Spawn it
- Break prefab Instance until its red
- Enable or add all the missing RplComponents
- Remove the old prefab
- Make a new one with drag and drop
- Replace it on the spawner and delete the preview that we spawned and it should work :D
Feel free to support my work by donating:
- Sample Coop Addon
https://github.com/exocs/Reforger-Sample-Coop
© 2022 BOHEMIA INTERACTIVE a.s. ARMA REFORGER®, ENFUSION®, and BOHEMIA INTERACTIVE® are registered trademarks of BOHEMIA INTERACTIVE a.s. All rights reserved.
See https://community.bistudio.com/wiki/Category:Arma_Reforger for more information.
License: https://www.bohemia.net/community/licenses/arma-public-license