Thanks for your help, but then I have another problem. Perhaps not as serious, but nothing I mess around with seems to work.
I just used Add UnitType because I don't know how to add a specific unit that hasn't actually spawned yet.
I tried making a Unit variable, saying that Unit = closest unit to point 011, so I could then just refer to the variable whenever I needed the escort. Again, the hero did nothing. Since the hero spawns from a trigger, it doesn't appear in the "Value" list. Do you have any suggestions what else I can use?
Just a quick description of what I have; you and 3 others hold out in a small base from the oncoming zombie apocalypse.
At first, you choose 1 out of 6 heroes who all have levels.
Then you choose which units you want to spawn from a dialog. Similar to some tug of wars, you simply click whatever button you want and those units then spawn around your hero.
The gamemode is extremely difficult for 1 player alone to win, since it's built for 4 player co-op. This is why I want to create an AI for it.
I've never made an actual AI before, the zombies never needed one, they simply attack the nearest unit.
I've made a "temporary AI" using lots of different clumsy, non-dynamic triggers. The AI is extremely simple, it says that:
AIEventsGame-MapinitializationLocalVariablesConditionsActionsGeneral-Pickeachintegerfrom1to4,anddo(Actions)ActionsGeneral-If(Conditions)thendo(Actions)elsedo(Actions)If(Statusofplayer(Pickedinteger))!=PlayingThenUnit-Create1JimRaynor(Commando)forplayer(Pickedinteger)atPoint012facing(Randomangle)degrees(NoOptions)Trigger-RunAIorders(CheckConditions,Don't Wait until it finishes)Else
Basically spawns a hero for the player who's not there, meaning that different units will spawn around that hero. They also have the same thinking as the zombies - attack the nearest unit. The biggest problem is that they don't use their abilities since the Tactical AI is not enabled.
So, the campaign AI is started for player 2 and I've added 6 ghosts to the attack wave.
Also, a trigger 1 second before this trigger spawns 6 ghosts for player 2, so it should be good to go, right?
Well, nothing happens in-game. The units are spawned around Jim Raynor, but they never move out.
Does anyone have any idea what might be wrong?
I've been trying to simulate an AI for my Zombie Survival/Horror mod, in this I have been successful so far.
When you first start out, you choose one of 6 heroes and can then choose your auto-spawn army from the left dialog.
I believe the core gameplay is finished, but I want to create a working AI before I publish it.
I want the AI to "take over" when a slot is empty - not only when it is replaced with an AI slot.
I can easily create a bunch of different triggers telling the AI to spawn their units along with the player's, but that would be a very clumsy solution.
I want to create a dynamic AI that grows at the same speed that the player does.
AIEventsGame-MapinitializationLocalVariablesConditionsActionsGeneral-Pickeachintegerfrom1to4,anddo(Actions)ActionsGeneral-If(Conditions)thendo(Actions)elsedo(Actions)If(Statusofplayer(Pickedinteger))!=PlayingThenUnit-Create1JimRaynor(Commando)forplayer(Pickedinteger)atPoint012facing(Randomangle)degrees(NoOptions)Trigger-RunAIorders(CheckConditions,Don't Wait until it finishes)Else
For those who cannot be bothered, it simply says that if a player isn't present, it spawns the hero Jim Raynor for them and runs the next trigger.
Again, this only means that 0.1 seconds before the auto-spawn army spawns, the integer variable "Ai kills" is being modified to +120.
Now, here's the actual problem.
My dialog code says that "Whenever the first dialog option is clicked, it sets (playerchoice[triggering_player] to 0 and (playerunits[triggering_player]) to (Unit types[0]).
(Unit types) was set earlier - Unit types[0] means Marines.
This carries on for all the 20 units available.
"Whenever the second dialog option is clicked, it sets (playerchoice[triggering_player]) to 1 and (playerunits[triggering_player]) to (Unit types[1]).
(Unit types) was set earlier - Unit types[1] means Ghosts.
Now, obviously, the AI can't press any dialogs themselves - but couldn't that simply be fixed by changing the dialogs another way? For example, instead of using "When dialog option clicked", you can use "When timer elapsed" or even "When any unit dies" if you'd like.
That's what I've tried here and I'm aware of my problem, but not a solution.
0
Thanks for all your suggestions, but I still can't get him to work.
This is what I made with your help, pplantenga, but he still refuses to follow them. I'm beginning to suspect something is wrong with my variable.
This is what I use to determine Jim Raynor as the variable. Any ideas?
0
@BasharTeg: Go
My hero is a Biological, Robotic, Heroic and Light hero.
The ones I want him to escort are Biological, Psionic and Heroic.
0
@Tolkfan: Go
Thank you for all your help, but he still refuses to move.
That is what I use to set Jim as the variable, then I use this to make him move.
Any idea what I might be missing here?
0
@Tolkfan: Go
Thanks for your help, but then I have another problem. Perhaps not as serious, but nothing I mess around with seems to work.
I just used Add UnitType because I don't know how to add a specific unit that hasn't actually spawned yet.
I tried making a Unit variable, saying that Unit = closest unit to point 011, so I could then just refer to the variable whenever I needed the escort. Again, the hero did nothing. Since the hero spawns from a trigger, it doesn't appear in the "Value" list. Do you have any suggestions what else I can use?
0
I've made an AI use attack waves just fine - but I do still need to figure out how the Escort ability works.
In my scenario, I want 6 ghosts to attack towards a point and then have a hero escort them there.
I'm not sure what I've done wrong, the ghosts attack but the hero doesn't follow after them. Here's my code so far:
As said, the hero just stands around in one place. Can anyone see what I've done wrong?
0
@Tolkfan: Go
It works perfectly! Thank you so much for your help.
If anyone else happens to google this and has the same problem, this is what I used:
0
Just a quick description of what I have; you and 3 others hold out in a small base from the oncoming zombie apocalypse.
At first, you choose 1 out of 6 heroes who all have levels.
Then you choose which units you want to spawn from a dialog. Similar to some tug of wars, you simply click whatever button you want and those units then spawn around your hero.
The gamemode is extremely difficult for 1 player alone to win, since it's built for 4 player co-op. This is why I want to create an AI for it.
I've never made an actual AI before, the zombies never needed one, they simply attack the nearest unit.
I've made a "temporary AI" using lots of different clumsy, non-dynamic triggers. The AI is extremely simple, it says that:
Basically spawns a hero for the player who's not there, meaning that different units will spawn around that hero. They also have the same thinking as the zombies - attack the nearest unit. The biggest problem is that they don't use their abilities since the Tactical AI is not enabled.
So, what I have so far is:
and
So, the campaign AI is started for player 2 and I've added 6 ghosts to the attack wave. Also, a trigger 1 second before this trigger spawns 6 ghosts for player 2, so it should be good to go, right? Well, nothing happens in-game. The units are spawned around Jim Raynor, but they never move out. Does anyone have any idea what might be wrong?
0
I've been trying to simulate an AI for my Zombie Survival/Horror mod, in this I have been successful so far.
When you first start out, you choose one of 6 heroes and can then choose your auto-spawn army from the left dialog.
I believe the core gameplay is finished, but I want to create a working AI before I publish it.
I want the AI to "take over" when a slot is empty - not only when it is replaced with an AI slot.
I can easily create a bunch of different triggers telling the AI to spawn their units along with the player's, but that would be a very clumsy solution.
I want to create a dynamic AI that grows at the same speed that the player does.
For those who cannot be bothered, it simply says that if a player isn't present, it spawns the hero Jim Raynor for them and runs the next trigger.
For those who cannot be bothered, it tells all the AI units (except the "Robotic" hero Jim Raynor) to attack any living zombie in the map.
Everything above is almost useless when it comes to the real problem, but I just wanted it said so this following part isn't confusing.
Again, this only means that 0.1 seconds before the auto-spawn army spawns, the integer variable "Ai kills" is being modified to +120.
Now, here's the actual problem.
My dialog code says that "Whenever the first dialog option is clicked, it sets (playerchoice[triggering_player] to 0 and (playerunits[triggering_player]) to (Unit types[0]). (Unit types) was set earlier - Unit types[0] means Marines.
This carries on for all the 20 units available.
"Whenever the second dialog option is clicked, it sets (playerchoice[triggering_player]) to 1 and (playerunits[triggering_player]) to (Unit types[1]). (Unit types) was set earlier - Unit types[1] means Ghosts.
Now, obviously, the AI can't press any dialogs themselves - but couldn't that simply be fixed by changing the dialogs another way? For example, instead of using "When dialog option clicked", you can use "When timer elapsed" or even "When any unit dies" if you'd like.
That's what I've tried here and I'm aware of my problem, but not a solution.
Noticed my problem yet? No? Let's look again.
The problem is that my event is a timer, but my action is a Triggering player. No player has triggered the timer, so nothing will happen.
I've tested the AI and it works perfectly, but it only spawns marines because it is stuck in the first dialog option.
That is my question now - is there anything else I can use to make my dynamic AI change dialogs?
Sorry for this long and incredibly boring post, this has just been tormenting me for days and any help I could get would be appreciated.
((Side note: I realise that this way of doing it isn't dynamic at all - I just wanted to see if I could make the AI change dialogs.))
((Also, I do know that the last trigger would trigger the change for everyone, not only the AI. I'm sure I can figure that out on my own, though.))