An RPG Respawn System

ArmyOfFrogs

New Member
Reaction score
20
Well, after many many hours of pondering and a few hours of tinkering, I have come to the conclusion that respawn systems suck. However, what I would appreciate from TH is any advice on the most painless way to go about setting one up, or any comments on the method that I am considering using.

Edited out as it doesn't work, just going to paste what i put down my next post as it's the closest to a working idea as i can form.


Edited again sorry lol, just found a possible solution, and would like to just run it through with the pros here.
Again, thanks for any help it is very much appreciated.


Code:
Events - Map Initialization
A - Unit Group - Pick every unit in (Units in (Playable map area) owned by Player 11 (Dark Green)) and do (Actions)
          Loop - Actions
               Unit Group - Add (Picked unit) to UnitGroup1
               Set NumberofUnits = (Number of units in UnitGroup1)
      Unit Group - Pick every unit in UnitGroup1 and do (Actions)
           For each (Integer A) from 1 to NumberofUnits, do (Actions)
                 Set UnitArray [Integer A] = (don't know how to get the individual unit types from the unitgroup?)

So the problem lies in being able to set the UnitArray [] equal to the seperate unit types and also know which ones they are, so that I can set up the separate respawn timers, and also be able to control which units will respawn and which ones won't.
 

Legacyspy

New Member
Reaction score
19
At game start pick every unit owned by the w/e player the creeps are.
have an integer variable count count
pick every unit in unit group
set int count = int count+1
set rezpoint[int count] = location of picked unit
set unit[in count] = picked unit

periodic every X seconds
for each integer a to int count
if unit[int a] is dead then create 1 unit type of unit[int a] at rezpoint[int a] and set last created unit = unit[int a]
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top