Author Topic: I need to delete units without using a specific unit ID  (Read 1825 times)

Sphere

  • Full Member
  • ***
  • Posts: 117
    • View Profile
I need to area delete units. Any ideas?

Sphere

  • Full Member
  • ***
  • Posts: 117
    • View Profile
Re: I need to delete units without using a specific unit ID
« Reply #1 on: 2014-12-18 22:16:16 »
What I want to do basically is, simulate the detonation of a strategic device, altering the landscape, and deleting the units that were there. I cannot simply grab unit ID numbers individually. It would be great I guess if I could get away with using squads, and then work with on enter and on exit to change between squads for the player, and just on enter for the AI attacking. Only that I am not yet sure how to trigger on turn changed the deletion of every unit in a squad.

Do I have the tools to do this? O -O
« Last Edit: 2014-12-18 22:18:40 by Sphere »

Sphere

  • Full Member
  • ***
  • Posts: 117
    • View Profile
Re: I need to delete units without using a specific unit ID
« Reply #2 on: 2014-12-19 06:55:11 »
Still working on this. Any help?

Sphere

  • Full Member
  • ***
  • Posts: 117
    • View Profile
Re: I need to delete units without using a specific unit ID
« Reply #3 on: 2014-12-21 14:10:05 »
So I found out that I can delete units as a squad, if I change their team as a squad, and have a trigger detect this change.

A bit sad that I had to figure this out myself. :x
« Last Edit: 2014-12-21 14:25:14 by Sphere »

Sphere

  • Full Member
  • ***
  • Posts: 117
    • View Profile
Re: I need to delete units without using a specific unit ID
« Reply #4 on: 2014-12-22 11:13:28 »
So glad there is an aoe in and out trigger. Cause with that I can add and subtract squads, at least that's what I hope will happen. I gotta build a test and run it. I already tested to see if a squad can be deleted by changing team. Will give more info later.

Sphere

  • Full Member
  • ***
  • Posts: 117
    • View Profile
Re: I need to delete units without using a specific unit ID
« Reply #5 on: 2014-12-23 18:03:10 »
I am having trouble where the grassland terrain will turn into water and the game will stop responding. Another problem I had was where every unit in the map was deleted. Another was where the enemy AI stopped working all together and wouldn't do anything. This game has bugs still it seems...

Also encountering a random problem with place unit. It will stop and not move the unit desired. It's random though, but it can result in the game play being broken.

I must say that I am not very impressed. I had a really cool idea for a map challenge, and was already half way done with building an impressive experience for the player to immerse themselves into. Why are there no real descent ways to delete units?
« Last Edit: 2014-12-23 18:06:59 by Sphere »

Sphere

  • Full Member
  • ***
  • Posts: 117
    • View Profile
Re: I need to delete units without using a specific unit ID
« Reply #6 on: 2014-12-24 17:16:20 »
I am running into that problem again where all of my forces are converted into units deemed ready for destruction. It seems to be the primary problem is the adding of units via touch trigger. I'm not entirely sure why, but I have my suspicions.

Sphere

  • Full Member
  • ***
  • Posts: 117
    • View Profile
Re: I need to delete units without using a specific unit ID
« Reply #7 on: 2014-12-31 16:44:21 »
Having trouble adding random units to a player squad by touch trigger zone. =|

Sphere

  • Full Member
  • ***
  • Posts: 117
    • View Profile
Re: I need to delete units without using a specific unit ID
« Reply #8 on: 2015-01-19 14:38:50 »
I figured out an interesting way to nuke units in mass. However this method nukes all the units of a team. Listen up and learn:

For the map that I have built, the city that needs to be defended by you, later launches a nuke off to some unknown place. It's mentioned in dialog as to what it could be. Doesn't matter really. But what does matter is, the enemy retaliates later on with permission from their country, to use nukes back in return. So the city gets blasted away. I figured what I could do is, for the challengemap, is to have all the units in the territory of the city, be a separate team that you control. When enemies come into the city, they change to another team as well, and anything you bring into the city, or leave from the city, will change team.

So what you need to do to work this:

You really need to have units that will change team. I did try by squad. That does work if the units in the squad were determined before the game started. I could not get the game to add units to a squad, it didn't work; not by area trigger. You can also have them change team by area trigger, like for my city. Entering the city changes it to a separate team, and leaving changes it back. Not the most ideal though, but it's better than nothing I guess. The next thing you need is a trigger. For me I went with a on turn change event, and compared a variable that would +1 each turn when it is told to start counting, and not until it is told. I went with a variable because I didn't want it counting until the player actually approaches the city and takes command to defend it. Before that I wanted it to be dormant. I then had another variable, this to be set to 1, and then after it's done killing units, set back to 0. I didn't want it deleting buildings that are captured, outside the nuke event. Next you gotta setup a trigger that removes units -1 of any team changed team, with a variable condition set to 1, to be turned back to 0 in a dialog or something. Try figuring your own way to disable the nuke on change team. The change team event trigger will be useful for when you tell the change round trigger, to change team of unit matching any type of unit of team "number here" to "number here".

Since I also am using trains in my map, I will need to figure out how carridges are handled when the train engine changes team. It would be great to say, if the engine here is taken, assume the carridges will change over along with the train. But a person may choose to leave the carridges behind unhooked. It would be great if the game handles this itself. Buuuut if it does not, then I will have to figure out something useful to counter a potential problem. I actually wonder if the train unhooks the carridges when the engine alone is changed team. What happens to the mechanics?
« Last Edit: 2015-01-19 17:50:56 by Sphere »

Sphere

  • Full Member
  • ***
  • Posts: 117
    • View Profile
Re: I need to delete units without using a specific unit ID
« Reply #9 on: 2015-01-25 16:38:49 »
^ well that didn't work. Because it started changing all the units on a team when something entered the trigger zone, which is not how the test worked. In the test, it changed just 1 unit, the one that entered the zone. Now it wants to be a jerkface.

So I scrapped that idea and went with about 100 turrets that teleport into the city and blast everything away, only to disappear after they are done. That along with objects deleted, and terrain altered, and done. However I did find that I cannot spawn craters, script breaks. I also cannot delete farmsteads. Bugs bugs bugs. Urgh!

Farnsi

  • Sr. Member
  • ****
  • Posts: 261
    • View Profile
Re: I need to delete units without using a specific unit ID
« Reply #10 on: 2015-03-25 14:43:31 »
Clever solution :)
Aber man wird ja noch träumen dürfen, man wird noch träumen dürfen....

Darlenecife

  • Newbie
  • *
  • Posts: 2
    • View Profile
I need to delete units without using a specific unit ID
« Reply #11 on: 2016-01-01 12:14:40 »
I added myself to the registration thread thread a week ago but haven't been added.  Would love to help test out the Beta.  Is there a trick to getting listed, or is just a wait 'n see process?