Kryose's AI question(s) - ongoing

Help - Resources - AI Scripting - Grafting - Plugins - Modding Projects
billking
Posts: 6
Joined: Sun May 18, 2008 9:44 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby billking » Tue May 20, 2008 7:18 am

[quote name='Spirus' post='4113' date='May 19 2008, 11:16 AM']1. the Scv's will be built if there exists a CC already
2. the rax won't go where the CC is if it's already there? :)[/quote]
Ideally, the CC would NOT already be at the expansion. I was just looking for a way to instruct the computer to build more of something without caring about how many were existing beforehand.

I'll probably just have to make a flowchart & manually code the whole thing. :(
Kryose
Posts: 49
Joined: Fri Apr 25, 2008 4:26 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby Kryose » Tue May 20, 2008 4:11 pm

User avatar
Spirus
Posts: 52
Joined: Tue Feb 05, 2008 2:35 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby Spirus » Tue May 20, 2008 4:47 pm

[quote name='billking' post='4138' date='May 19 2008, 11:18 PM']Ideally, the CC would NOT already be at the expansion.[/quote]Oh this is an expansion? I'm not sure how the expand command works. I think it requires a CC to be built there first, but I could be wrong. A simple test would answer this. Maybe I can make one later.

[quote name='Kryose' post='4142' date='May 20 2008, 08:11 AM']Normal suicide loops have a multirun that builds X amount of units, then it waits a certain amount of time, then it 'send_suicide 0's the new units for an attack. Does the send suicide clear all the 'in training' commands?[/quote]good question. Ashara uses send_suicide in his Ai a lot and has done a lot of testing with the train command. You might use the search feature and look through his topics as I remember reading something like this.

Maybe make a test? The script couldn't take more than a few minutes to write and there are a lot of premade replays that will save you the time testing too.
IskatuMesk
Posts: 329
Joined: Wed May 16, 2007 5:57 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby IskatuMesk » Tue May 20, 2008 5:00 pm

As soon as send_suicide is triggered, it triggers. It doesn't wait.
User avatar
Spirus
Posts: 52
Joined: Tue Feb 05, 2008 2:35 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby Spirus » Tue May 20, 2008 5:19 pm

I think he understands that send_suicide is instant. At least based on what he has coded and his question. I think his question is does send_suicide interrupt a prior train call. "wait" was a confusing term used in conjunction with send_suicide. . Does the Ai stop training the 30 tanks or does it continue building the 30 even after the current # of tanks have been sent to their suicidal death?
User avatar
ashara
Posts: 170
Joined: Wed Feb 06, 2008 11:12 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby ashara » Tue May 20, 2008 6:31 pm

Ai will continue to train the 30 tanks.
If send_suicide is done with 15 tanks and they are all destroyed, Ai will re-train tanks until having 30 of them - this means the train command will produce 45 tanks in the end.
Kryose
Posts: 49
Joined: Fri Apr 25, 2008 4:26 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby Kryose » Tue May 20, 2008 6:32 pm

Is there any way around this?
User avatar
ashara
Posts: 170
Joined: Wed Feb 06, 2008 11:12 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby ashara » Tue May 20, 2008 6:41 pm

None that I know of, kill_thread does not stop the current command.
You can put wait_train/wait_force before the send_suicide() but that's probably not really interesting since it's blocking.

The best solution is probably to put train commands in different multiruns, this way Ai won't wait having 30 tanks before making 20 goliaths, it should be a mix of them. But with this solution you will still get a total train of 45 tanks if 15 are destroyed during the attack.
Kryose
Posts: 49
Joined: Fri Apr 25, 2008 4:26 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby Kryose » Tue May 20, 2008 7:05 pm

Thanks for the answers. I am currently using multiruns for different unit building, but I guess I will have to deal with a little bit more mixed up mass attacks.
IskatuMesk
Posts: 329
Joined: Wed May 16, 2007 5:57 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby IskatuMesk » Tue May 20, 2008 8:05 pm

I think I found out why the AI had two of Syrius, now.

Gay. I hope I can devise a workaround for this.

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Return to “StarCraft Modding”

Who is online

Users browsing this forum: No registered users and 0 guests