common-ai-script?

Discussion about Shadowgrounds and Shadowgrounds Survivor Mods and the Level Editor.
Roidal
Posts: 29
Joined: Wed Aug 16, 2006 6:46 pm

common-ai-script?

Postby Roidal » Wed Aug 06, 2008 6:03 pm

Is there a common-ai script for all scriptless aliens? I placed some Brutemauler without assigning a script to it, so in the mission_ai.dhs there are no ai-scriptcalls for this unit but he was attacking?

User avatar
fb_joel
Site Admin
Posts: 2482
Joined: Fri Feb 18, 2005 2:14 pm
Location: Finland

Re: common-ai-script?

Postby fb_joel » Thu Aug 07, 2008 1:19 am

So you wanted an unintelligent Brute and yet it was intelligent? Miracle!

;)

Did it move at all, or was it just standing around and shooting/hitting? This may indeed be some sort of a "bug". A quick workaround might be to set its AI to Neutral or Ally state (it's the box just below the unit list, and it's Hostile by default). Then it won't attack.
// Joel, Frozenbyte team

Roidal
Posts: 29
Joined: Wed Aug 16, 2006 6:46 pm

Re: common-ai-script?

Postby Roidal » Thu Aug 07, 2008 11:55 am

The Brutemauler does not movig, he is only shooting at me. No, i don't want an unintelligent Brute, but i want to know how does the game and the scripts work, so i tried every possible thing and in this way i saw that the Brutemauler attacks without an ai-script. :D Maybe the ai-scripts are for moving, and the weapons shoot without?

Roidal
Posts: 29
Joined: Wed Aug 16, 2006 6:46 pm

Re: common-ai-script?

Postby Roidal » Thu Aug 07, 2008 1:56 pm

Now i tried it with a scavenger. At first he do nothing, but if it hears you (if you shoot with a weapon) he moves for one or two seconds and from this moment he turns everytime to you. Then, if you go to the scavenger, he attacks, but don't moves.

User avatar
fb_joel
Site Admin
Posts: 2482
Joined: Fri Feb 18, 2005 2:14 pm
Location: Finland

Re: common-ai-script?

Postby fb_joel » Thu Aug 07, 2008 5:53 pm

Ok, the programmers told me that this is in fact a "reflex". Each unit gets a target (the player) from a general AI, and the units will try to attack the target even if they have no AI. It's a bit more complicated than this explanation though. This can be prevented by setting the unit to ally or neutral, or by a script: setUnitByIdString "yourunitid" (given in properties window); disableUnitAI (or so); clearTarget; setMode hold_fire (or so).
// Joel, Frozenbyte team

Roidal
Posts: 29
Joined: Wed Aug 16, 2006 6:46 pm

Re: common-ai-script?

Postby Roidal » Thu Aug 07, 2008 6:09 pm

Thank you again! :)


Return to “Mods / Level Editor”

Who is online

Users browsing this forum: No registered users and 3 guests