Did you know? All of these messages will likely be replaced before release.

CreatureFactory not passing on alarmtag, itemtag to custom pawns

For questions and discussion about UnrealEd, UnrealScript, and other aspects of Unreal Engine design.

Moderators: Semfry, ividyon

User avatar gubar
Skaarj Scout Skaarj Scout
Posts: 27
Joined: 11 Jun 2013, 01:24
Location: Popping up randomly in the world.
Contact:

Subject: CreatureFactory not passing on alarmtag, itemtag to custom pawns

Post Posted: 12 Apr 2014, 23:15

The title pretty much speaks for itself. I got stuck with this problem.

So to make she scenario a bit clearer, I've set up three spawnpoints with a CreatureFactory linked to each. These originally spawned regular brutes. I have an AlarmPoint for each of the brutes to follow. The alarmtag variables of the CreatureFactories are set up to match those of the AlarmPoints. The itemtag variable is set to the same thing for each CF, and I have a trigger linked to that tag which starts the entire ambush. It all works perfectly with regular brutes.

However, I wanted to create a subclass for Brute and change some of the default properties like health, sightradius etc. which I can't seem to do otherwise with CreatureFactories. So I set up the CF/SP to spawn this customized Brute class instead. It works up to the point when the creatures are spawned, but they don't seem to pick up either the alarmtag or the itemtag or both because they are just standing there doing nothing until they actually see the player.

I hope it's not too confusing the way I explained it.


Any ideas would be appreciated. Maybe somebody knows an entirely different way of doing the same thing.

User avatar Mister_Prophet
Red Nemesis Leader Red Nemesis Leader
Posts: 3098
Joined: 11 Nov 2007, 23:30
Location: Lost in Oraghar

Subject: Re: CreatureFactory not passing on alarmtag, itemtag to custom pawns

Post Posted: 14 Apr 2014, 22:54

It depends largely on what is changed. I know sometimes custom subclasses behave weird like this with certain enemies, even normal ones sometimes refuse to do something no matter how careful you set up a sequence (have fun with pupae). AI intelligence can also make a difference too, if that has been altered.

If I may pry, if the scene worked fine enough with normal brutes then how necessary is it to use edited guys? Is this for a difficulty filter/COOP thing or you simply trying to make the enemies more interesting, less predictable?

User avatar gubar
Skaarj Scout Skaarj Scout
Posts: 27
Joined: 11 Jun 2013, 01:24
Location: Popping up randomly in the world.
Contact:

Subject: Re: CreatureFactory not passing on alarmtag, itemtag to custom pawns

Post Posted: 15 Apr 2014, 11:09

Mister_Prophet wrote:It depends largely on what is changed. I know sometimes custom subclasses behave weird like this with certain enemies, even normal ones sometimes refuse to do something no matter how careful you set up a sequence (have fun with pupae). AI intelligence can also make a difference too, if that has been altered.

If I may pry, if the scene worked fine enough with normal brutes then how necessary is it to use edited guys? Is this for a difficulty filter/COOP thing or you simply trying to make the enemies more interesting, less predictable?


The only thing that changed were some of the default properties really, no new code was added.

There are multiple reasons I used custom brutes, one of which was for difficulty filtering. It was supposed to be an ambush which puts the player in a relatively hot situation but while testing I found that it is not much of a challenge to finish off three brutes (even behemoths) when there is enough space to dodge the rockets. I wanted to increase their health, skill and projectile speed to make it more exciting.

The other reason was that I fired a music event at the start of the ambush, and I wanted to use a counter to change the music back again after all three brutes were killed. For that, I needed to spawn brutes with their Event field set to a specific value.

Since the brutes start their ambush from behind the top of an uphill section of the terrain (with the intention of surprising the player with three of these aggressive creatures running up from behind the hill right in front of his/her face), I could have just placed them there with orders: waiting instead of spawning them, but I didn't want them to wander too far while waiting to make the timing of the attack more precise, and more importantly, that section of the terrain can be seen from a high point far back in the map which would have ruined the surprise element.

Anyway, thanks for the reply, good to know that you had issues with these kind of scripted sequences too and it is not necessarily me doing something the wrong way. I will play around with it a bit more and perhaps look into the code of CreatureFactory and SpawnPoint and see if I can figure something out.

User avatar Mister_Prophet
Red Nemesis Leader Red Nemesis Leader
Posts: 3098
Joined: 11 Nov 2007, 23:30
Location: Lost in Oraghar

Subject: Re: CreatureFactory not passing on alarmtag, itemtag to custom pawns

Post Posted: 15 Apr 2014, 17:09

gubar wrote:
The only thing that changed were some of the default properties really, no new code was added.

There are multiple reasons I used custom brutes, one of which was for difficulty filtering. It was supposed to be an ambush which puts the player in a relatively hot situation but while testing I found that it is not much of a challenge to finish off three brutes (even behemoths) when there is enough space to dodge the rockets. I wanted to increase their health, skill and projectile speed to make it more exciting.


Fair enough reason. I typically try to avoid using new/custom pawns with spawn factories because I've had issues like this before. As I said, some dudes work fine, others...it's like if you change their stats they go bugshit. You did of course select Compile Changed in their editscript properties before saving the map, right?

gubar wrote:The other reason was that I fired a music event at the start of the ambush, and I wanted to use a counter to change the music back again after all three brutes were killed. For that, I needed to spawn brutes with their Event field set to a specific value.


You can actually do this through the creature factory itself by setting the counter tag to the factory event. You'll have to add one more numerical to the counter since simply triggering the factory counts as one and the first death counts as two, and so on till the last, so the counter you use will always need to be one number higher than the amount of enemies you have appearing (if your factory has a COOP capacity added, though, that might mess it up). Just an alternative if you absolutely have to revert to default brutes.


gubar wrote:Since the brutes start their ambush from behind the top of an uphill section of the terrain (with the intention of surprising the player with three of these aggressive creatures running up from behind the hill right in front of his/her face), I could have just placed them there with orders: waiting instead of spawning them, but I didn't want them to wander too far while waiting to make the timing of the attack more precise, and more importantly, that section of the terrain can be seen from a high point far back in the map which would have ruined the surprise element.

Anyway, thanks for the reply, good to know that you had issues with these kind of scripted sequences too and it is not necessarily me doing something the wrong way. I will play around with it a bit more and perhaps look into the code of CreatureFactory and SpawnPoint and see if I can figure something out.


I find that if I have to spawn a custom pawn, I try to do it in ambush situations where they will immediately see the player upon appearing, initiating their attack the moment they appear. Otherwise, what is strange is that patrol points sometimes work when alarm tags for spawns do not. Granted, they won't be moving as quickly, but they can still go to the desired ambush point.

User avatar gubar
Skaarj Scout Skaarj Scout
Posts: 27
Joined: 11 Jun 2013, 01:24
Location: Popping up randomly in the world.
Contact:

Subject: Re: CreatureFactory not passing on alarmtag, itemtag to custom pawns

Post Posted: 18 Apr 2014, 11:53

Somehow the custom brute problem resolved itself, but I am not sure what happened. Really confusing, but as long as it works I'm fine with it. I try not to touch anything around those actors. :)

Thanks for the tips though. However, that CreatureFactory trick does not seem to work for me. The death of the brutes does not cause the factory to fire a new event. I set up the counter to display the countmessage to make sure but nothing. The only way I could make it fire a new event is to actually spawn a new brute, which I don't want.

I also tried saving the event into the custom brutes default properties, same result... So I'm yet to find a workaround for the music.

Anyway, I'm glad that the first problem is out of the way, at least.


Who is online

Users browsing this forum: No registered users and 39 guests

Copyright © 2001-2024 UnrealSP.org

Powered by phpBB® Forum Software © phpBB Limited