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:39 am]
Ultraviolet -- no u elky skeleton guy, I'll use em better
[10:50 pm]
Vrael -- Ultraviolet
Ultraviolet shouted: How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
hey cut it out I'm getting all the minerals
[10:11 pm]
Ultraviolet -- :P
[10:11 pm]
Ultraviolet -- How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
[2024-4-17. : 11:50 pm]
O)FaRTy1billion[MM] -- nice, now i have more than enough
[2024-4-17. : 11:49 pm]
O)FaRTy1billion[MM] -- if i don't gamble them away first
[2024-4-17. : 11:49 pm]
O)FaRTy1billion[MM] -- o, due to a donation i now have enough minerals to send you minerals
[2024-4-17. : 3:26 am]
O)FaRTy1billion[MM] -- i have to ask for minerals first tho cuz i don't have enough to send
[2024-4-17. : 1:53 am]
Vrael -- bet u'll ask for my minerals first and then just send me some lousy vespene gas instead
[2024-4-17. : 1:52 am]
Vrael -- hah do you think I was born yesterday?
Please log in to shout.


Members Online: Roy