Call to Arms

Call to Arms

Not enough ratings
TjDagger's Editor Gems, Respawn Group
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
4.075 MB
7 Jun, 2018 @ 6:02pm
1 Dec, 2018 @ 2:13pm
4 Change Notes ( view )

Subscribe to download
TjDagger's Editor Gems, Respawn Group

In 1 collection by Tjdagger
Tjdaggers SP & Co-op Experimental Maps & Mission Concepts
22 items
Description
This is a small mod containing a map and mission file illustrating how to spawn and Respawn pre-placed groups of entities in the editor.
To use, Activate the mod in the editor. Map and mission can be found in single/respawn_groups.

In this mission file you will find 3 triggers
reb
reb1
reb2

These 3 triggers control the spawning of 3 groups of Rebel soldiers named, "reb", "reb1" and "reb2".

There are two variations of the script.

The first, which includes triggers "reb" and "reb1" use the "call" command to feed the group name into a function called "respawn_group". (you can view function by pressing F9 while in F3 and selecting "functions")
Triggers "reb" and "reb1" also "Set" an event called "respawn_group". This event is then "Reset" in the called function "respawn_group". The purpose of this is prevent multiple instances of the function being called simultaneously, which would result in units potentially spawning in other locations.
You will notice "1 & !2" in the conditions. The "!2" represents "not 2". This forces multiple instances of the function called to fire in sequence.

The second variation ("reb2") is a simple version of the function contained within the trigger.

Pros and cons,

The "function" variation requires less scripting and is easy to applly in multiple triggers simply using the "call" command with the group name as the "context". If multiple are called, there may be a delay as they are fired in sequence. The delay will vary depending on how many units are being spawned.

The simple version is more labour intensive, scripting wise (this can be shortcut with a reasonable knowledge of notepad++), plus it creates a bigger mi file. However by using unique naming via this longhand method, placement conflicts are avoided when similar triggers are called simultaneously.

Updated with a second mi file called "respawn_group_buttons".




4 Comments
tAnK_SkULL 8 May, 2021 @ 5:32pm 
That sounds so exciting and yes, by all means, upload many more scripts please lol. As I said they help very dearly.

I have a folder now titled tjdagger with all your work in there for both Cta's and Mowas2 and so, I will experiment with your scripts and thus, adding my own in too and it all a wonderful learning experience with having your crucial work to reach out to when I get stuck etc.

Great stuff.
Thanks.
Tjdagger  [author] 7 May, 2021 @ 5:07pm 
@ tAnK_SkULL
Hey mate, makes me happy to hear your enjoying my scripts.
I've got a bunch of other stuff I want to share too.
I'm at the point now where i'm exploring whats possible with editing background files for props. Then combining that with my editor scripting knowledge to create some unique bits and pieces.
tAnK_SkULL 7 May, 2021 @ 4:34pm 
Your script mods are priceless.
Thank You for sharing your work.
It helps us modders very dearly.
OJ_Tasso 26 Dec, 2018 @ 2:05am 
sounds good