logo
Main

Forums

Downloads

Unreal-Netiquette

Donate for Oldunreal:
Donate

borderline

Links to our wiki:
Wiki

Walkthrough

Links

Tutorials

Unreal Reference

Usermaps

borderline

Contact us:
Submit News
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic A little new to editing, wanting to know how to make Na Pali wildlife attack anything (Read 2478 times)
Mrsir4
New Member
*
Offline


Oldunreal member

Posts: 2
Joined: May 12th, 2014
Gender: Male
A little new to editing, wanting to know how to make Na Pali wildlife attack anything
May 12th, 2014 at 3:17am
Print Post  
So I am not sure where to post this, but I am wanting some advice. I am a little new to using UnrealED and am working on a single player project. One of the things I am wanting to do is give players the ability to use the Na Pali wildlife to their advantage (i.e. luring a brute into a tentacle infested cave where they can light him up, or tricking a skaarj enemy into getting torn up in a pool of slith, etc.)

So basically what I am wanting to do is to get these pawns to attack not only the player, but other enemies when they spot them. Not just tentacles and slith but any enemy that is considered wildlife on Na Pali (yes, including titans)....I tried changing their attitude toward the player in their settings in UnrealED, but there was not much difference. Any suggestions? I have made a couple of levels of my own; but again, compared to everyone else in the community I am a total noob when it comes to editing. So I apologize if I am asking stupid questions. But thanks in advance for your help!
  
Back to top
 
IP Logged
 
[]KAOS[]Casey
Developer Team
Betatester
Offline


nedm

Posts: 3189
Joined: Aug 7th, 2011
Gender: Male
Re: A little new to editing, wanting to know how to make Na Pali wildlife attack anything
Reply #1 - May 12th, 2014 at 6:25am
Print Post  
It's possible, but you're going to need to edit some AI or make a hack class.

Most things will attack eachother if they take damage by default, sometimes not. But they will not actively acquire eachother as enemies. This is because there is no code to actively try to get them to set enemy to eachother.

Playerpawns are actively checked every frame by some conditions, like distance & visibility etc.

Assuming the pawn can "see" the player, this function happens:


Code
Select All
function SeePlayer(Actor SeenPlayer)
{
	//log(class$" has line of sight to player");
	if (SetEnemy(Pawn(SeenPlayer)))
		LastSeenPos = Enemy.Location;
} 



You can simulate this either on a small or wide area depending on how you want it to work.

I can make an easy but dirty hack that attempts to set enemy on everything, which will probably not end well, or for a specific Zone and versus only a few types, which you'd have to edit in your map of course.

For instance, you could put an actor in a specific zone, edit a few properties to make "tentacle" hate "brute" actively, instead of reactively. Or I could make it work globally so no matter where they are they'll acquire enemies, on either all or specific types.

Provide some more detail and I can help you out.
  
Back to top
 
IP Logged
 
SFJake
Full Member
***
Offline


Oldunreal member

Posts: 248
Joined: Aug 15th, 2010
Gender: Male
Re: A little new to editing, wanting to know how to make Na Pali wildlife attack anything
Reply #2 - May 12th, 2014 at 1:45pm
Print Post  
Its easier than that, now, thanks to new features with the new versions.

Assuming you downloaded the latest 227 versions...

Under AI, there is an option called SightCheckType, normally at SEE_PlayersOnly.

If set to SEE_All, it will check everything in sight at all time.

All that is left to do is create a sub class of a pawn to edit its expected attitude toward a monster.

If you created a sub class of Mercenary, and want him to attack SkaarjWarrior on sights... then you create a sub class of Mercenary, go in the Mercenary code and find the eAttitude segment.

Code
Select All
function eAttitude AttitudeToCreature(Pawn Other)
{
	if ( Other.IsA('Mercenary') )
		return ATTITUDE_Friendly;
	else
		return ATTITUDE_Ignore;
} 



We want it to hate all Skaarj when checked, so COPY/PASTE it to the new sub-class, and change it to:

Code
Select All
function eAttitude AttitudeToCreature(Pawn Other)
{
	if ( Other.IsA('Mercenary') )
		return ATTITUDE_Friendly;
	else if ( Other.IsA('Skaarj') )
		return ATTITUDE_Hate;
	else
		return ATTITUDE_Ignore;
} 



You might want to edit the sub-class's default properties to SEE_All, to make it easier on you.

And thats it. Note that this feature can make mapping difficult, if you don't want fights to constantly break out without the player having done anything.

There are other ways to do this, but this is the simple and clean way.
  
Back to top
 
IP Logged
 
[]KAOS[]Casey
Developer Team
Betatester
Offline


nedm

Posts: 3189
Joined: Aug 7th, 2011
Gender: Male
Re: A little new to editing, wanting to know how to make Na Pali wildlife attack anything
Reply #3 - May 13th, 2014 at 1:05am
Print Post  
This is the Unrealed 1 forum, not 2.1!

That is an option but it certainly won't work for all versions.
  
Back to top
 
IP Logged
 
SFJake
Full Member
***
Offline


Oldunreal member

Posts: 248
Joined: Aug 15th, 2010
Gender: Male
Re: A little new to editing, wanting to know how to make Na Pali wildlife attack anything
Reply #4 - May 13th, 2014 at 5:14am
Print Post  
Oh god, there are different sections?

I'm sorry, I've had a link for this part of the forum for years now, and I just assumed anything related to Unreal 1 went here, and thats where I posted everything.

My apologies if it doesn't apply, however I tend to have the mindset that anything Unreal 1 should be using the latest oldunreal patch anyway.
  
Back to top
 
IP Logged
 
[]KAOS[]Casey
Developer Team
Betatester
Offline


nedm

Posts: 3189
Joined: Aug 7th, 2011
Gender: Male
Re: A little new to editing, wanting to know how to make Na Pali wildlife attack anything
Reply #5 - May 13th, 2014 at 7:32am
Print Post  
Haha, it's not really a problem. there's actually three unrealed forums. 1.0, 2.0 and 2.1. It does not hurt to mention methods, particularly that one which I thought to mention but I wanted to figure out what he wanted first. He also did not note what version or what have you he was planning to mod on
  
Back to top
 
IP Logged
 
.:..:
Oldunreal MasterPoster
Developer Team
*
Offline



Posts: 1503
Location: Finland
Joined: Aug 16th, 2005
Gender: Male
Re: A little new to editing, wanting to know how to make Na Pali wildlife attack anything
Reply #6 - May 14th, 2014 at 3:57am
Print Post  
Alternatively use Trigger, proximity type to Class and Class to trigger to 'Skaarj' or 'Brute', then make that trigger all tentacles or sliths in the cave to force them attack that target.
  

Shivaxi wrote on Jul 25th, 2013 at 12:50pm:
...and now im stuck trying to fix everything you broke for the next 227 release xD Tongue

(ಠ_ಠ)
Back to top
IP Logged
 
Mrsir4
New Member
*
Offline


Oldunreal member

Posts: 2
Joined: May 12th, 2014
Gender: Male
Re: A little new to editing, wanting to know how to make Na Pali wildlife attack anything
Reply #7 - May 22nd, 2014 at 2:09am
Print Post  
Sorry for replying late. I am in college right now and the computer I am using for this project is at my home away from the university. But I am using UnrealEd 2.0....Sorry for posting on the wrong forum, I should have checked which version UnrealEd I have before posting the question -_-

But basically what I am wanting to do is get a pawn (or pawns) to attack anything, not just the player.

Thanks for the advice you guys have given me so far! Smiley
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint
Bookmarks: del.icio.us Digg Facebook Google Google+ Linked in reddit StumbleUpon Twitter Yahoo