Staredit Network > Forums > SC2 Assistance > Topic: [Solved] Custom Artifficial Intelligence
[Solved] Custom Artifficial Intelligence
This topic is locked. You can no longer write replies here.
Sep 14 2010, 12:46 am
By: payne  

Sep 14 2010, 12:46 am payne Post #1

:payne:

I tried to design a custom AI for my arena.
Somehow, I discovered "Issue Order" trigger action works well, but if you want to call abilities that are of type "Effect - Target", you need to use "Tactical AI - Cast"... the problem is that this action only suggests (instead of forcing) the ability to be casted to the computer... and in my case, he never decides to obey (:().
Any fix? :O

P.S. I haven't set Start Locations and the Controllers are Users, but they automatically become Computers (Unused player controller) when the game starts. It might be it?



None.

Sep 14 2010, 1:12 am Temp Post #2



You can use Issue order to do target abilities as well. Change order with no target.



None.

Sep 14 2010, 1:42 am payne Post #3

:payne:

Quote from Temp
You can use Issue order to do target abilities as well. Change order with no target.
Oh shi-! That parenthesis was well hidden! :P
Thanks. ^^

EDIT: Wait... none of the Cast Ability work now :O

Post has been edited 1 time(s), last time on Sep 14 2010, 1:49 am by payne.



None.

Sep 14 2010, 2:15 am Temp Post #4



Not sure what you mean.



None.

Sep 14 2010, 2:22 am payne Post #5

:payne:

I have a trigger that has an event "Unit is attacked"
Then a condition "Controller == Unused" (which are the Computers since they are in fact absent players)
The action is something like "Make triggering unit cast 'Absorb' ability".

... but I don't understand why the ability isn't casted. ;o



None.

Sep 14 2010, 2:46 am shmeeps Post #6



Did the action work before the change? I don't think an Unused player slot technically has any AI, and if it is taken by a Computer Player, you would have to use Controller = Computer.



None.

Sep 14 2010, 2:49 am payne Post #7

:payne:

Quote from shmeeps
Did the action work before the change? I don't think an Unused player slot technically has any AI, and if it is taken by a Computer Player, you would have to use Controller = Computer.
Well, when the only AI trigger I had was the one I depicted, it worked.
Then I added more abilities, and nothing worked anymore, which is weird. Could it be because I use the Unit is Attack event in different triggers ordering to cast an ability, replacing existing order?

And when I had the single trigger, Controller == Computer didn't work. Unused worked, though.



None.

Sep 14 2010, 10:16 pm Sand Wraith Post #8

she/her

Quote from payne
Quote from shmeeps
Did the action work before the change? I don't think an Unused player slot technically has any AI, and if it is taken by a Computer Player, you would have to use Controller = Computer.
Well, when the only AI trigger I had was the one I depicted, it worked.
Then I added more abilities, and nothing worked anymore, which is weird. Could it be because I use the Unit is Attack event in different triggers ordering to cast an ability, replacing existing order?

And when I had the single trigger, Controller == Computer didn't work. Unused worked, though.

You should try troubleshooting the highlighted issue. Although, I would expect at least one trigger to take precedence and do something.

You might want to show the trigger code for all of the triggers that are relevant.




Sep 15 2010, 4:06 am payne Post #9

:payne:

http://vgshorts.com/BBCode/BBCode3.php?ID=96

Check out this one and tell me what's wrong. ;o



None.

Sep 15 2010, 9:01 am Ahli Post #10

I do stuff and thingies... Try widening and reducing the number of small nooks and crannies to correct the problem.

In your trigger the status of the player has to be "unused" AND "Left the Game"? So the trigger won't run.
That's not how the OR works like you intended it does.
The OR and AND contains a list with conditions. That AND or OR only connects the conditions inside their list. The default condition list is interpreted as an AND's list { if( cond A, cond B) equals if( AND( cond A, cond B) ) }.

Anyway, I would check the unit's type to avoid spamming orders to units that doesn't have that order...




Sep 15 2010, 2:30 pm payne Post #11

:payne:

Temp told me that as well, but thanks! :P
The only unit the players can control is a Stalker. All other units are Neutral ;o



None.

Sep 15 2010, 4:12 pm shmeeps Post #12



Yeah, biggest thing I see is the Conditions, which are correctly set-up, they should both be under the Or section. Otherwise you're saying essentially saying (Status == Unused AND (Status == Left OR Status == Left), which would probably always return false?



None.

Sep 19 2010, 7:22 pm payne Post #13

:payne:

I forgot to say: Solved.
It was indeed because of how I was using the Or condition.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[01:24 pm]
Vrael -- NEED SOME SPORTBALL> WE GOT YOUR SPORTBALL EQUIPMENT MANUFACTURING
[2024-4-30. : 5:08 pm]
Oh_Man -- https://youtu.be/lGxUOgfmUCQ
[2024-4-30. : 7:43 am]
NudeRaider -- Vrael
Vrael shouted: if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
Yeah I'm not a big fan of Westernhagen either, Fanta vier much better! But they didn't drop the lyrics that fit the situation. Farty: Ich bin wieder hier; nobody: in meinem Revier; Me: war nie wirklich weg
[2024-4-29. : 6:36 pm]
RIVE -- Nah, I'm still on Orange Box.
[2024-4-29. : 4:36 pm]
Oh_Man -- anyone play Outside the Box yet? it was a fun time
[2024-4-29. : 12:52 pm]
Vrael -- if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
[2024-4-29. : 11:17 am]
Zycorax -- :wob:
[2024-4-27. : 9:38 pm]
NudeRaider -- Ultraviolet
Ultraviolet shouted: NudeRaider sing it brother
trust me, you don't wanna hear that. I defer that to the pros.
[2024-4-27. : 7:56 pm]
Ultraviolet -- NudeRaider
NudeRaider shouted: "War nie wirklich weg" 🎵
sing it brother
[2024-4-27. : 6:24 pm]
NudeRaider -- "War nie wirklich weg" 🎵
Please log in to shout.


Members Online: Roy