Making NPCs attack each other.

The place to discuss all things Lugaru.
Post Reply
User avatar
Blorx
NOT A FRIGGIN PROGRAMMER
Posts: 3272
Joined: Wed Jan 26, 2005 4:01 pm
Location: South Carolina, United States
Contact:

Making NPCs attack each other.

Post by Blorx » Wed Apr 14, 2010 5:50 pm

Has anyone found a way to do this in Lugaru yet?

I was thinking about finally making a campaign, in which one of the levels would force you to not only protect yourself, but an NPC, as well, and was wondering if anyone had ever found a way to script it in.

User avatar
invertin
Sticky
Posts: 3828
Joined: Mon Oct 23, 2006 4:05 am
Location: IN A CAN OF AWESOME!

Re: Making NPCs attack each other.

Post by invertin » Thu Apr 15, 2010 5:03 am

I'm pretty sure all of the NPCS are either set to "Killing you" or "Not killing anything", unless they turn on eachother if they deal damage there isn't really a way of doing this.

User avatar
Blorx
NOT A FRIGGIN PROGRAMMER
Posts: 3272
Joined: Wed Jan 26, 2005 4:01 pm
Location: South Carolina, United States
Contact:

Re: Making NPCs attack each other.

Post by Blorx » Thu Apr 15, 2010 3:34 pm

Sham. I was hoping for a good way to do that because I wanted one level to be like a "protect person x" level.

I'm going to request a way to do this in Overgrowth now, haha. :lol:

User avatar
h2ostra
Posts: 197
Joined: Mon Feb 09, 2009 4:42 pm
Location: Davis, CA

Re: Making NPCs attack each other.

Post by h2ostra » Fri Apr 16, 2010 2:06 am

I found a way to make only one NPC attack the player in user-created levels, by inflicting enough falling damage on them (push them into an uneven surface, so that they start to jump, then knock them out of the air by colliding with them). Unfortunately, you cannot attack them, and neither will any other NPC's, though the aggressor can attack you. I believe that they will stop attacking you after a while, but I don't remember.

I still have no idea how anyone could put this to practical use.

User avatar
rudel_ic
official Wolfire heckler
Posts: 2193
Joined: Sun Aug 28, 2005 11:19 pm
Location: Hamburg City
Contact:

Re: Making NPCs attack each other.

Post by rudel_ic » Fri Apr 16, 2010 4:54 am

Blorx wrote:Has anyone found a way to do this in Lugaru yet?

I was thinking about finally making a campaign, in which one of the levels would force you to not only protect yourself, but an NPC, as well, and was wondering if anyone had ever found a way to script it in.
There's no way of doing that. But you could work around it - tell a story.

Like

CUTSCENE - You and your NPC pal walk along, raiders come around the corner, they threaten your pal, you say "I will protect my pal. HAVE AT YOU"
FIGHT - Hit them in the face numerous times. Pal stands back, but is visible; next cutscene is triggered upon you approaching him
CUTSCENE - "Oh no, they got you." Etc

I think that should kinda work.

User avatar
NinjaRabbits
Posts: 248
Joined: Sun Nov 23, 2008 4:27 pm
Location: At home playing Lugaru HD.

Re: Making NPCs attack each other.

Post by NinjaRabbits » Fri Apr 16, 2010 2:00 pm

Yeah, that's what I do.

OMG, my maps keep failing no matter if I don't have to many peoples or the wrong dialogue!
This is getting stupid. :(

User avatar
invertin
Sticky
Posts: 3828
Joined: Mon Oct 23, 2006 4:05 am
Location: IN A CAN OF AWESOME!

Re: Making NPCs attack each other.

Post by invertin » Fri Apr 16, 2010 5:13 pm

h2ostra wrote:I still have no idea how anyone could put this to practical use.
Could be a good way of introducing a dangerous badguy, or making a horror campaign. There's not much scarier than something meaner than you that you can't do anything about.

User avatar
Blorx
NOT A FRIGGIN PROGRAMMER
Posts: 3272
Joined: Wed Jan 26, 2005 4:01 pm
Location: South Carolina, United States
Contact:

Re: Making NPCs attack each other.

Post by Blorx » Fri Apr 16, 2010 5:16 pm

invertin wrote:
h2ostra wrote:I still have no idea how anyone could put this to practical use.
Could be a good way of introducing a dangerous badguy, or making a horror campaign. There's not much scarier than something meaner than you that you can't do anything about.
This is a pretty valid point. I know it's always scarier knowing that the bad guy is there and you can't get to him just yet than it is actually facing him.

User avatar
h2ostra
Posts: 197
Joined: Mon Feb 09, 2009 4:42 pm
Location: Davis, CA

Re: Making NPCs attack each other.

Post by h2ostra » Sat Apr 17, 2010 5:08 am

invertin wrote:
h2ostra wrote:I still have no idea how anyone could put this to practical use.
Could be a good way of introducing a dangerous badguy, or making a horror campaign. There's not much scarier than something meaner than you that you can't do anything about.
yeah, but my point was that I don't know of any way to recreate this that does not involve very purposefully colliding with them in mid-air multiple times. If you can think of a valid in-game. explanation, and implement it (or find a different way to recreate the results), sure, by all means, I think it could be a great tool

User avatar
Untadaike
Posts: 1660
Joined: Mon Jan 05, 2009 7:46 pm
Contact:

Re: Making NPCs attack each other.

Post by Untadaike » Tue Apr 27, 2010 11:49 am

Sometimes when I play, there's a bug or something and an enemy will random start attacking another. I'll try and get a screenshot, but it happens once in a thousand levels.

Post Reply