Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Roaming-Intelligent AI?
Roaming-Intelligent AI?
Mar 7 2008, 10:32 pm
By: Polantaris  

Mar 7 2008, 10:32 pm Polantaris Post #1



Is there a way to get the AI to roam the map intelligently?
What I mean is that right now my AI does a Random Suicide Run Script, and its pretty obvious it knows exactly where I am, and how to get to me. Is there a way to get it to kinda go after a random unit, but also roam around? For example, it has an objective as to where it is going, but it doesn't go straight there, and can end up running into something else and attacking that instead of its original objective.



None.

Mar 7 2008, 10:38 pm NudeRaider Post #2

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

You could make a location following that computer unit and if any other player brings a unit into this location center the location on the other unit and order the comp unit to patrol there.




Mar 7 2008, 10:41 pm Falkoner Post #3



Or visa-versa, use Junk Yard Dog AI, and have a location following the player, if the computer goes to that location, order it to go after the player.



None.

Mar 7 2008, 10:47 pm Polantaris Post #4



Is Junk Yard Dog AI one of the ones from the other Editors? I'm actually using the Official SE atm. It wouldnt cause a problem with my map to switch would it?



None.

Mar 7 2008, 10:50 pm Shook1(ConFed) Post #5



If you are using regular SC Editor, then no it won't cause a problem to switch from SC Editor to any other editor as because the other editors have more stuff to it than SC Editor. If it was the other way around, then you might lose some units or doodads and etc...



None.

Mar 7 2008, 10:59 pm Falkoner Post #6



If you want, just switch to make the AI action, and switch back and there shouldn't be any problems.



None.

Mar 7 2008, 11:40 pm NudeRaider Post #7

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

lol I didn't realize StarEdit even hasn't junkyard dog ai. I sometimes forget HOW restricted that editor is... O.o

I recommend you to switch to scmdraft 2 v0.8. It's the best all round editor available.




Mar 7 2008, 11:57 pm Polantaris Post #8



That's what I did switch to. I guess theres a reason its 0.8, but no problem with that here. I set them Junkyard Dog, but for some reason after installing it and Xtra (I tried Xtra first and it didnt work for some reason) SC wont start up anymore. I'm gonna reboot but I'm downloading ssomething so once thats done =P



None.

Mar 8 2008, 12:33 am Polantaris Post #9



How does the Junkyard Dog thing work? I did the following Trigger:
Condition:
When Current Player controls exactly 0 Terran Civilian
Actions:
Execute AI Script: "Set Unit Order To: Junk Yard Dog"
Preserve Trigger

This does nothing. They get their unit and just sit there.



None.

Mar 8 2008, 12:37 am Falkoner Post #10



Junk Yard Dog is a location AI, SCM doesn't have them organized.



None.

Mar 8 2008, 12:44 am Polantaris Post #11



How do I add the location then?



None.

Mar 8 2008, 12:52 am Shook1(ConFed) Post #12



Use Run Al Script at Location instead of Run Al Script....but I didn't think Junk Yard Dog was even in Al Script without the Location...it should be in the trigger set anyways...



None.

Mar 8 2008, 1:02 am Polantaris Post #13



Thanks, it works now. I just thought of an idea that would get them to both randomly run around, and attack people, because at the moment they just run around like idiots with no set direction in mind.

Conditions:
Current Player controls exactly 0 Terran Civilian (So that it doesnt send a Civilian off to do something and end them with no unit at all)
Actions:
Preserve Trigger
Enable AI Script "Junk Yard Dog" at Anywhere
Wait 5000 Milliseconds
Enable AI Script "Send All Units on Random Suicide Missions"
Wait 5000 Milliseconds

That way, as long as they have a unit besides a Civilian, They will first just randomly move around, then select someone, and begin to go after him, but then just start running around again.

Sound like it will work?

Edit: I might keep them in the Suicide Missions longer. Do they attack while in Juck Yard Dog mode?



None.

Mar 8 2008, 2:12 am Vi3t-X Post #14



I beleive they do, but if not, issue the units to patrol to certain points of attack?



None.

Mar 8 2008, 2:23 am Polantaris Post #15



It seems that they do not. They just pass each other practically right next to each other and dont do anything attacking wise when they are in Junk Yard Dog mode. I just gave them infinate Go on random suicide missions while they have no civilians. That will do I suppose, but it would be nice if I didnt have to. Oh well.



None.

Mar 8 2008, 3:16 am Symmetry Post #16

Dungeon Master

Here's one way to do it. This is only good in certain circumstances though, so it might not fit what you're trying to do.

Attachments:
intelligentroam.scm
Hits: 3 Size: 38.69kb



:voy: :jaff: :voy: :jaff:

Mar 8 2008, 4:10 am Shook1(ConFed) Post #17



Okay well put the preserve trigger action on the bottom



None.

Mar 8 2008, 5:01 am Polantaris Post #18



I just played it with all the computers in, and I just realized, that it works without having them just run around like idiots. They all choose random targets based on what they can kill and it just turns the map into a blood bath of hell. It's really fun. Once I work out all the bugs...hmmm...



None.

Mar 9 2008, 9:58 am y10k Post #19



Once you gave suicide AI to units, you can only give a different one to them, if you give them to an other player and back to original.



None.

Mar 9 2008, 10:26 am NudeRaider Post #20

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Quote from Polantaris
It seems that they do not. They just pass each other practically right next to each other and dont do anything attacking wise when they are in Junk Yard Dog mode. I just gave them infinate Go on random suicide missions while they have no civilians. That will do I suppose, but it would be nice if I didnt have to. Oh well.
When on junkyard dog units WILL attack enemies. They just have a lower "acquisition range".
If you always/preserved execute any order (actual order action, junkyard ai, suicide mission ai) on hyper triggers they don't have time to attack at all because they need about a half second to execute a new order.
You'll need to delay the orders with a dc timer.




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[06:47 am]
NudeRaider -- lil-Inferno
lil-Inferno shouted: nah
strong
[05:41 am]
Ultraviolet -- 🤔 so inf is in you?
[04:57 am]
O)FaRTy1billion[MM] -- my name is mud
[04:35 am]
Ultraviolet -- mud, meet my friend, the stick
[10:07 pm]
lil-Inferno -- nah
[08:36 pm]
Ultraviolet -- Inf, we've got a job for you. ASUS has been very naughty and we need our lil guy to go do their mom's to teach them if they fuck around, they gon' find out
[05:25 pm]
NudeRaider -- there he is, right on time! Go UV! :D
[05:24 pm]
lil-Inferno -- poopoo
[05:14 pm]
UndeadStar -- I wonder if that's what happened to me. A returned product (screen) was "officially lost" for a while before being found and refunded. Maybe it would have remained "lost" if I didn't communicate?
[03:36 pm]
NudeRaider -- :lol:
Please log in to shout.


Members Online: 9camilac8523wp6, jjf28, 3miae123rr9, Roy