So, I'm planning to do a mission like the final mission in the Frozen Throne, A Symphony of Frost and Flame, and I wondered: how do I best program something like that? If you don't know/remember, the idea is that you have 4 amount of spots you have to control, which you do by sending your hero to the spot, and then he channels for a while until control is yours. First to control all 4 spots wins.
My idea is of the mission is a bit different, but it works roughly the same way. Each of my spots is a nuclear tower, and in regular intervals, you and your enemy's base are nuked depending on who controls the towers. Example: if I control tower 1, a specific location X1 is nuked in the enemy's base. If he controls tower 1, a specific location Y1 is nuked in my base. In other words, each tower has a specific target location in each base. So, for tower 2, it would be X2 and Y2, depending on control.
Now, the nuking is each to do: just use a periodic timer and if-then-else actions.
But it's the controlling part that is tricky. Each player has to send a hero to control the towers, and how do I program it for the computer? I'd like him to go to random locations, but never go to one that he already occupies. It's sort of like Welcome to the Jungle. How do I do that?
So, I'm planning to do a mission like the final mission in the Frozen Throne, A Symphony of Frost and Flame, and I wondered: how do I best program something like that? If you don't know/remember, the idea is that you have 4 amount of spots you have to control, which you do by sending your hero to the spot, and then he channels for a while until control is yours. First to control all 4 spots wins.
My idea is of the mission is a bit different, but it works roughly the same way. Each of my spots is a nuclear tower, and in regular intervals, you and your enemy's base are nuked depending on who controls the towers. Example: if I control tower 1, a specific location X1 is nuked in the enemy's base. If he controls tower 1, a specific location Y1 is nuked in my base. In other words, each tower has a specific target location in each base. So, for tower 2, it would be X2 and Y2, depending on control.
Now, the nuking is each to do: just use a periodic timer and if-then-else actions.
But it's the controlling part that is tricky. Each player has to send a hero to control the towers, and how do I program it for the computer? I'd like him to go to random locations, but never go to one that he already occupies. It's sort of like Welcome to the Jungle. How do I do that?