I am making a Cat 'N Mouse map and I have done a bunch of stuff with the terrain which I think is really great so far. I have started on the triggers and editing the data, which, until now, I have had lots of success with. The problems start happening when I get into spawning units on top of my Probes, and rescuing them from "jail".
Basically what I want to happen:
Each player has one Probe.
Probes can run around with a region attached to them.
Units bought (trained) from the Armory (which I successfully edited) are instantly moved the player's Probe upon creation.
If the Probe dies, a different Probe is spawned in the jail (this is mostly for show).
If an another ally's Probe runs to the outside of the jail, the Probes-in-jail are destroyed and new Probes are spawned outside of the jail.
The original regions from step 2 are reattached to the probes so that units created at the armory can now spawn again on top of the Probe.
I am having problems with step 5. When my first probe is killed, the region has nowhere to go so it stays at whichever position the original probe died at, and I have no idea how to reattach it to the newly spawned, "rescued" probe.
The way I'm doing this is probably not the best, and any suggestions are welcome!
have an array of units the size of the max number of players, and an array of regions the same size. when the probe is first created for a player, set the variable at the player's index to the probe, and set the region variable the same way. this is what your move region trigger might look like:
sorry for the very sloppy trigger writing, i'm kinda lazy right now and don't have the editor on this computer. i'm sure there's a few mistakes in there but i hope it helps.
I'm having problems with the "for each player in all players" part. I found the action, but it requires me to set the "player" part to a variable, and I have no idea what to do with this.
sorry, i meant the player group- pick each player in All Players. also i think i7esperado's way of attaching the region to the unit is wayyyyyy better than the one i proposed.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I am making a Cat 'N Mouse map and I have done a bunch of stuff with the terrain which I think is really great so far. I have started on the triggers and editing the data, which, until now, I have had lots of success with. The problems start happening when I get into spawning units on top of my Probes, and rescuing them from "jail".
Basically what I want to happen:
I am having problems with step 5. When my first probe is killed, the region has nowhere to go so it stays at whichever position the original probe died at, and I have no idea how to reattach it to the newly spawned, "rescued" probe.
The way I'm doing this is probably not the best, and any suggestions are welcome!
- Thanks, Limezor
have an array of units the size of the max number of players, and an array of regions the same size. when the probe is first created for a player, set the variable at the player's index to the probe, and set the region variable the same way. this is what your move region trigger might look like:
have another trigger that like
and the jail break trigger
sorry for the very sloppy trigger writing, i'm kinda lazy right now and don't have the editor on this computer. i'm sure there's a few mistakes in there but i hope it helps.
Okay, first of all that is a lot of help. Second of all, I have no idea how to access the actual coding aspect of Galaxy Editor lol
Theres actually an action that you can use , instead of making a trigger go off every half second.
when your probe dies, just make it like this .
Atleast, thats how I would go about it.
I'm having problems with the "for each player in all players" part. I found the action, but it requires me to set the "player" part to a variable, and I have no idea what to do with this.
sorry, i meant the player group- pick each player in All Players. also i think i7esperado's way of attaching the region to the unit is wayyyyyy better than the one i proposed.