Hi all.
So I have been making my own custom mission map and I took the example scripts from an original map's scripts files. The idea was to have a team attack a trigger area and then respawn if they die.
Now here's the thing, they do respawn when they die but they double each time. The other team just respawns infinetly and crashes the game!
Sometimes they don't respawn which I also do not understand.
So any help would be greatly appreciated, here are the example scripts -
Hospital Captured (Script is Active + Deactivate Upon Success)
IF
If hospital unit is owned by player
THEN
Set timer - Hospital Assault to expire in 10 secs
(Currently inactive timer, not using it until I think I need to?)
Spawn Hospital Assault Team (Is active, Deactivate upon success)(Evaluate every 10 secs)
IF
If Player has greater than or equal to 1 of unit type ranger in area - Hospital zone
THEN
Spawn an instance of Hospital Assault Team
Hospital Assault Team IF Attacked (Is active, Is subroutine)
IF
If True
THEN
Team Attacks anything in area Hospital zone
Hospital Assault Team Attack (Is active, Is subroutine)
IF
If True
THEN
Have team wander along path
Enable script - Hospital Team Destroyed
Hospital Assault Team Destroyed (Deactivate Upon success)(Evaluates every 12 seconds)
IF
If Team Hospital Assault Team is destroyed
THEN
Spawn an instance of Team Hospital Assault Team
Team Properties
Home Position - Is offmap Team spawn WP
Priority - 50
Build for - 3000 frames
Min/Max - 10 Red Guards
Team Members are AI Recruitable
Behavior
On create - Hospital Assault Team Attack script
On enemy sighted - Hospital Assault Team IF Attacked script
On All clear - Hospital Assault Team Attack script
On Destoryed 100% - None
I just want the team to always be attacking the player and respawning. The scripts will be turned off after some time, about 5 or 10 mins.