Jump to content

Recommended Posts

First of all, describe what you want exactly. It's always boring to add features and features, just because the demand is not clear or poorly elaborated.

SP or MP?

player(s) side(s)?

AI(s) side(s)?

ranges?

type of units?

eventually mods?

delay? duration? amount of waves?

limit of randomization?

other details?

Share this post


Link to post
Share on other sites

This must work in multiplayer.

 

+ Enemies should spawn around any of the players

 

+ If the above is not possible, then the enemies should spawn around the group leader

 

Enemies (all AI controlled) who are are spawned will be of the faction that they are defined when placed in the editor

 

+ Ideally, this script would function by randomly selecting from a list of variables names which each define a team/vehicle, duplicate said team/vehicle to a location that is X meters from a player, enable simulation and model for said team/vehicle, then tell them to attack the player.

 

+ Example: If I place down only CSAT units, then only those CSAT units should be duplicated and spawned around the players

 

There are no "sides" involved, if a unit that is spawned is of an enemy faction to the player, then they will attack.

 

The types of units that will spawned are placed in the editor and have their simulation and model unchecked so they are invisible and immobile.

 

+ Analogy: script is randomly drawing from a deck of cards created by me in the editor. Each card has an enemy asset on it (fire team, tank, helicopter, etc). This unit is then duplicated at a location that is X meters from a player, enabled and visible, and ordered to attack the player

 

I do not have any plans to use modded units with this script. I will be using ACE, Enhanced Movement, NATO Tropical Vehicle Colors, TFAR.

 

When the duplicated unit is killed, a new unit is spawned and told to attack the player. This process should continue indefinitely as long as the spawned units are continuously killed/destroyed.

 

+ Earlier versions of this script malfunctioned when a vehicle was disabled, but the crew survived and the vehicle did not "blow" (you could still interact with it). Because the asset was not fully destroyed, it did not trigger the spawning of a new enemy. I have no idea how to solve this.

 

++ Maybe vehicle assets could be destroyed when they reach a certain health value?

 

The limit of the randomization is constrained to the amount of enemy assets that are created in he editor (the number of "ghost" units waiting to be duplicated and activated).

 

In the future, I would like to augment this to spawn and arbitrary number of units at a time.

 

+ If I pre-place 3 types of infantry teams and 1 tank and set the spawn number to 2, then 1 type of infantry and the tank may spawn at a time.

 

++ These units could be replaced individually or as a wave, doesn't matter.

 

I realize my language is not-standard when compared to that of someone with scripting knowledge. I will provide as much detail as I can.

Share this post


Link to post
Share on other sites

First, there is no interest to pre-place hidden/disabled sim units. Then enable them, then duplicate when dead.

You just have to choose or decide some location / position (absolute / relative to player), then spawn what you want. The Editor stays light and the result is same (especially if you respawn units);

 

- To choose locations / positions, you need to check that on your map. That means, specific positions and spawning units triggers when players approaches them.

- or, no matter the positions of the players, you spawn units, relative to the current players' positions but you need a timer or something triggering the spawn (addAction), and a check for water/land occurrence.

Share this post


Link to post
Share on other sites
On 6/17/2018 at 9:07 AM, pierremgi said:

First, there is no interest to pre-place hidden/disabled sim units. Then enable them, then duplicate when dead.

You just have to choose or decide some location / position (absolute / relative to player), then spawn what you want. The Editor stays light and the result is same (especially if you respawn units);

 

- To choose locations / positions, you need to check that on your map. That means, specific positions and spawning units triggers when players approaches them.

- or, no matter the positions of the players, you spawn units, relative to the current players' positions but you need a timer or something triggering the spawn (addAction), and a check for water/land occurrence.

 

There is a misunderstanding. I am not asking for advice on how to achieve this. I already did that here: 

 

The script I was given in the previously linked thread achieves some of the functions I desire. In the previous thread, I explain when the script that was made for me fails.

 

I am looking for someone to make a script. This forum is titled "Find or Offer Editing".

Share this post


Link to post
Share on other sites

No problem. I just asked or suggested some decent ways to script what I understood for your project. The good start can add in efficiency. This approach is not incompatible with this forum. So, sorry, disregard my previous post.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×