Mindustry

Mindustry

View Stats:
how the hecc does the micro processor work?
it seems to obviously be like a coding interface, that's obvious. but i don't understand most of it. i can select a group of units using @crawler etc. i can use pathfind to make them go towards the enemy. though how do i find coordinates for one, how do i actually make my crawlers *attack* instead of stand there and die, etc. etc.
< >
Showing 1-14 of 14 comments
!?! Dec 6, 2020 @ 10:59pm 
This will make your novas fly to the processor and snipe enemies from there while keeping their distance.
Useful for singling them out and use them as anti air at specific points thanks to their high range, ability to hit air and ability to fly while all the plebs wait at the regular command center.

ubind @nova set boost 0 uradar enemy any any distance turret1 1 result jump 8 equal result false sensor outx result @x sensor outy result @y set attackrad 15 jump 12 always result false set outx @thisx set outy @thisy set attackrad 3 set boost 1 ucontrol boost boost outy attackrad 0 0 ucontrol approach outx outy attackrad 0 0 ucontrol target outx outy result 0 0

This doesn't work with the dagger line of mechs tho since you can't make them ignore terrain and I have no idea how to make pathfind do anything other than walk to the enemy spawn point.
Last edited by !?!; Dec 6, 2020 @ 11:07pm
acquaintedFowl Dec 7, 2020 @ 8:27am 
Originally posted by !?!:
This will make your novas fly to the processor and snipe enemies from there while keeping their distance.
Useful for singling them out and use them as anti air at specific points thanks to their high range, ability to hit air and ability to fly while all the plebs wait at the regular command center.

ubind @nova set boost 0 uradar enemy any any distance turret1 1 result jump 8 equal result false sensor outx result @x sensor outy result @y set attackrad 15 jump 12 always result false set outx @thisx set outy @thisy set attackrad 3 set boost 1 ucontrol boost boost outy attackrad 0 0 ucontrol approach outx outy attackrad 0 0 ucontrol target outx outy result 0 0

This doesn't work with the dagger line of mechs tho since you can't make them ignore terrain and I have no idea how to make pathfind do anything other than walk to the enemy spawn point.
what about making crawlers attack units?
AHDog Dec 8, 2020 @ 12:39am 
Originally posted by !?!:
I have no idea how to make pathfind do anything other than walk to the enemy spawn point.
There is no other way, pathfind just makes units revert to v5 dagger AI and walk towards the enemy core, I'm pretty sure.
Zaflis Dec 8, 2020 @ 1:29am 
Just a tip for others new to the micro processor, here's a way to stop a belt from feeding core more than it can hold. Lets assume you use T2 core with capacity 9000.
- Place micro processor near core and the belt. Select it and then click core and belt so they highlight blue. Now you also see their names, should be "foundation1" and "conveyor1", or numbers could be different.
- Click on the pen on processor and Add... 3 things:
1) Sensor: result = @copper in foudation1
2) Operation: if = result < 9000 ("if" is just name of this operation that i made up, use anything you like)
3) Control: set enabled of conveyor1 to if

So the logic is: if core has less than 9000 copper, enable belt.
If you don't use processor for this, the excess is destroyed!

Bonus, how to show the number in a message block:
First place and attach the "message1" or some number to the processor and add 2 more things at the end:
1) Print: result (this comes straight from the Sensor).
2) Print Flush: to message1
Last edited by Zaflis; Dec 8, 2020 @ 1:34am
!?! Dec 8, 2020 @ 1:43am 
You might also want to use this on your megas:

ubind @mega set ore @titanium ulocate damaged core false @copper outx outy found building jump 7 notEqual found true ucontrol approach outx outy 10 0 0 ucontrol target outx outy found 0 0 jump 0 always found true ucontrol target 0 0 0 0 0 sensor result @unit @totalItems op greaterThanEq full result 30 sensor result2 @unit @firstItem op notEqual wrongore result2 ore op land wrongore wrongore result op or empty wrongore full jump 19 equal empty true ulocate ore core true ore outx outy found building ucontrol approach outx outy 5 0 0 ucontrol mine outx outy 0 0 0 jump 0 always x false ulocate building core false @copper outx outy found building ucontrol approach outx outy 5 0 0 sensor result @unit @totalItems ucontrol itemDrop building result 0 0 0 jump 0 always x false

It'll make them mine titanium if there is nothing left to repair so you can get rid of all your titanium miners and they won't idle right in the enemies face and get shot constantly.
toto Dec 14, 2020 @ 1:17pm 
Originally posted by Zaflis:
Just a tip for others new to the micro processor, here's a way to stop a belt from feeding core more than it can hold. Lets assume you use T2 core with capacity 9000.
- Place micro processor near core and the belt. Select it and then click core and belt so they highlight blue. Now you also see their names, should be "foundation1" and "conveyor1", or numbers could be different.
- Click on the pen on processor and Add... 3 things:
1) Sensor: result = @copper in foudation1
2) Operation: if = result < 9000 ("if" is just name of this operation that i made up, use anything you like)
3) Control: set enabled of conveyor1 to if

So the logic is: if core has less than 9000 copper, enable belt.
If you don't use processor for this, the excess is destroyed!

Bonus, how to show the number in a message block:
First place and attach the "message1" or some number to the processor and add 2 more things at the end:
1) Print: result (this comes straight from the Sensor).
2) Print Flush: to message1

How do you put the name for 2 words ore like phase fabric or spore pod in the code?
AHDog Dec 14, 2020 @ 3:55pm 
Originally posted by toto:
How do you put the name for 2 words ore like phase fabric or spore pod in the code?

If you use the sensor command and pick an item by clicking the pencil icon, you'll see. Usually you replace spaces with hyphens, like @phase-fabric.
toto Dec 14, 2020 @ 5:55pm 
Originally posted by AHDog:
Originally posted by toto:
How do you put the name for 2 words ore like phase fabric or spore pod in the code?

If you use the sensor command and pick an item by clicking the pencil icon, you'll see. Usually you replace spaces with hyphens, like @phase-fabric.

thanks!
acquaintedFowl Jun 13, 2021 @ 4:29pm 
can i just say it's been half a year and nobody's actually given me a proper answer? read the description... :PuroAmazed: nobody actually told me how the hell to make a crawler not just stand there and ♥♥♥♥♥♥♥ die
Last edited by acquaintedFowl; Jun 13, 2021 @ 4:30pm
Panterich Jun 13, 2021 @ 6:27pm 
Originally posted by acquaintedFowl:
can i just say it's been half a year and nobody's actually given me a proper answer? read the description... :PuroAmazed: nobody actually told me how the hell to make a crawler not just stand there and ♥♥♥♥♥♥♥ die
First answer was a proper answer. Because discussion title is very vague and op is full of "etc. etc.". Make better questions to get better answers.

Originally posted by acquaintedFowl:
how the hell to make a crawler not just stand there and ♥♥♥♥♥♥♥ die
Find and approach targets as was shown, then check distance and attack
# check distance ucontrol within # attack ucontrol targetp @unit true
Last edited by Panterich; Jun 13, 2021 @ 6:29pm
AHDog Jun 13, 2021 @ 6:42pm 
Originally posted by acquaintedFowl:
can i just say it's been half a year and nobody's actually given me a proper answer? read the description... :PuroAmazed: nobody actually told me how the hell to make a crawler not just stand there and ♥♥♥♥♥♥♥ die
You might find #logic helpful in the Mindustry Discord. You can ask questions and get responses real-time.
By the way, crawlers don't shoot, walking into walls and exploding is just what they do.
Originally posted by acquaintedFowl:
though how do i find coordinates for one, how do i actually make my crawlers *attack* instead of stand there and die, etc. etc.
Can you clarify what exactly you're trying to do? What are you trying to find the coordinates of? What are you trying to make them attack?
Sorry you haven't been getting the answers you are looking for!
Last edited by AHDog; Jun 13, 2021 @ 6:57pm
acquaintedFowl Jun 14, 2021 @ 5:04am 
Originally posted by AHDog:
Originally posted by acquaintedFowl:
can i just say it's been half a year and nobody's actually given me a proper answer? read the description... :PuroAmazed: nobody actually told me how the hell to make a crawler not just stand there and ♥♥♥♥♥♥♥ die
You might find #logic helpful in the Mindustry Discord. You can ask questions and get responses real-time.
By the way, crawlers don't shoot, walking into walls and exploding is just what they do.
Originally posted by acquaintedFowl:
though how do i find coordinates for one, how do i actually make my crawlers *attack* instead of stand there and die, etc. etc.
Can you clarify what exactly you're trying to do? What are you trying to find the coordinates of? What are you trying to make them attack?
Sorry you haven't been getting the answers you are looking for!

mainly i haven't been having a problem moving units to coords, shooting at things, i'm mainly just confused on how to get a unit to move towards a unit - like getting the specific coordinates of a selected unit
Last edited by acquaintedFowl; Jun 14, 2021 @ 5:25am
acquaintedFowl Jun 14, 2021 @ 5:04am 
also sorry for being kind of an ass, was having kind of a bad day yesterday :/

I'll try the stuff you guys gave me, and leave this as is. :PuroHappy:
Last edited by acquaintedFowl; Jun 14, 2021 @ 7:11am
$-PALEO-$ Jun 16, 2021 @ 3:10pm 
i like your funny words magic man :)
< >
Showing 1-14 of 14 comments
Per page: 1530 50

Date Posted: Dec 6, 2020 @ 6:47pm
Posts: 14