Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: [SOLVED]Junkyard Dog units won't attack
[SOLVED]Junkyard Dog units won't attack
This topic is locked. You can no longer write replies here.
Sep 5 2007, 2:52 am
By: TF-  

Sep 5 2007, 2:52 am TF- Post #1

🤙🏾

I want to have some random enemies roaming the map and engaging each other, but while the Junkyard Dog AI script is great for making units walk around randomly across the whole map without a ton of locations and triggers, it prevents them from attacking anything, probably because the order is 'move' rather than 'move-attack'. Is there any fix to this or am I gonna have to use triggers instead of the script?



🤙🏾

Sep 5 2007, 2:53 am Falkoner Post #2



Are you sure? From what I've seen they attack.



None.

Sep 5 2007, 3:13 am TF- Post #3

🤙🏾

Pretty sure, they respond to attack but don't initiate it. The two players in question are definitely computer-controlled enemies.



🤙🏾

Sep 5 2007, 3:15 am Falkoner Post #4



Ah, that might be true that they only respond to attack, you could have a 1 pixel location follow each one around and center larger locations on the units inside the tiny locations, then order them to patrol.



None.

Sep 5 2007, 3:15 am blacklight28 Post #5



ummm mine attack but i put preserve trigger so they stop, did u put preserve trig?



None.

Sep 5 2007, 3:31 am TF- Post #6

🤙🏾

Well with preserve trigger they just jitter in place without going anywhere, without they roam the map normally, in either cases they won't attack.



🤙🏾

Sep 6 2007, 1:38 am AntiSleep Post #7



well, the way to do this is to have a location following your hero, and when any enemies enter this area, they patrol to your hero.

You either need 1 location following every hero to detect enemies, or 1 following all enemies to detect humans.



None.

Sep 6 2007, 2:33 am ShinRa Post #8



Are you using hyper triggers and/or Preserve Trigger?



None.

Sep 6 2007, 3:19 am RIVE Post #9

Just Here For The Pie

Have you thought about using Run AI Script: Send All Units on Random Suicide Missions, but place a few large locations on common parts of the map where computer are told to move/attack constantly to when ever they enter it? It works alright in a few Cat and Mouse games where the cats are computers.



None.

Sep 6 2007, 3:37 am Roy Post #10

An artist's depiction of an Extended Unit Death

Quote from AntiSleep
well, the way to do this is to have a location following your hero, and when any enemies enter this area, they patrol to your hero.

You either need 1 location following every hero to detect enemies, or 1 following all enemies to detect humans.
You make it sound like it's an rpg even though he never stated what it was.

The question asked was if the 'Junkyard Dog' script could be used with the units in question being aggressive (attack nearby enemies). A solid answer is no.

You could have them junk yard dog, wait/death count, then patrol to 'anywhere' followed by another pause via waits/death counters and a preserve trigger. That way, they will move a little bit towards the center of the map if there are no foes around, but if there is one around, they will start attacking that unit, and hopefully continue to even after junkyard dog runs again.

If it is like an rpg such as what AntiSleep was talking about (which is doesn't sound like to me), having a location follow the player's unit like he said would be a good way of going about it. And in the case of having computer vs computer, you're going to need a lot of locations to follow all of one computer's units -.-

Edit(Roy): Some units like siege tanks will attack while moving under junk yard dog scripting. Just a fun fact :P




Sep 6 2007, 3:50 am Falkoner Post #11



If the unit in question is being attacked, it should fight back, won't most units automatically attack them?



None.

Sep 6 2007, 9:28 am AntiSleep Post #12



Or just make a few locations and pick one at random to patrol to.(anywhere is just a location covering the whole map, meaning they would patrol to the center of the map if you used that as a location)

Post has been edited 1 time(s), last time on Sep 6 2007, 9:51 am by AntiSleep.



None.

Sep 6 2007, 10:42 am who Post #13



Quote from Falkoner
If the unit in question is being attacked, it should fight back, won't most units automatically attack them?
they won't attack back if they're given the "move" command



None.

Sep 6 2007, 12:49 pm Falkoner Post #14



Junk Yard AI is not 'given the "move" command' they are pretty much given an attack command.



None.

Sep 6 2007, 6:39 pm qPirateKing Post #15



Short answer: Ranged units will attack sometimes, but melee units usually won't.

Long answer: I speculate that units will attack if you are within their attack range between movement orders. There's a brief moment where they stop to change directions, and if you are in range at that moment, they will attack. If this is true, it's more likely that ranged units will attack since they have a larger attack range.

If you want to use the script, it certainly works fine if you stick to ranged units. Antisleep has a great solution, and I would recommend adapting it to fit your needs.



None.

Sep 7 2007, 2:09 am TF- Post #16

🤙🏾

Yep, the patrol thing seems to be working best, thanks for the help guys.



🤙🏾

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[08:01 am]
UEDCommander -- Suicidal Insanity
Suicidal Insanity shouted: http://photos.arlinghaus.org/Animals/Species/WesternJackdaw/2019.11.16-FSH_3770-QHD-%7BFA19D1D3-182C-4723-964D-C30A764A7D13%7D.jpg <- Its missing a speech bubble about SCR bad blizzard bad modding good 1.16 good
u
[02:16 am]
Ultraviolet -- Suicidal Insanity
Suicidal Insanity shouted: http://photos.arlinghaus.org/Animals/Species/WesternJackdaw/2019.11.16-FSH_3770-QHD-%7BFA19D1D3-182C-4723-964D-C30A764A7D13%7D.jpg <- Its missing a speech bubble about SCR bad blizzard bad modding good 1.16 good
http://www.staredit.net/uploads/avatars/4811.png?312523688 pretty solid ;)
[02:14 am]
Ultraviolet -- That's supposed to be pr0nogo :P
[12:43 am]
MTiger156 -- Not sure why it takes an ultra-high resolution image of a bird to get that point across, but ok
[06:36 pm]
Suicidal Insanity -- fortheovermind
fortheovermind shouted: my turn rate bar from the Create panel is no longer there. my games are created with the default 12 and i can no longer modify it, what could be causing this?
Known patch bug
[06:07 pm]
Ultraviolet -- lifebot This version appears to be older than the version I already have downloaded (1.5). Why is this one being posted?
[06:03 pm]
Ultraviolet -- Zoan
Zoan shouted: MTiger156 lifebot woah, that's awesome! I'm too lazy right now to check, but does it work with Remastered or 1.1.16 only?
I haven't used it in the latest version of remastered, but I assume it still works. It definitely did before. It's pretty neat. Super fast & easy way to create a save/load system
[05:02 pm]
fortheovermind -- my turn rate bar from the Create panel is no longer there. my games are created with the default 12 and i can no longer modify it, what could be causing this?
[04:50 pm]
Zoan -- MTiger156
MTiger156 shouted: Also, here's a link to its actual description http://www.staredit.net/topic/17696/
lifebot woah, that's awesome! I'm too lazy right now to check, but does it work with Remastered or 1.1.16 only?
Please log in to shout.


Members Online: Roy, jjf28, alumoq, GGmano