UE1 - UT calling touch on a flockpawn

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

gopostal

Active Member
Jan 19, 2006
848
47
28
Sounds simple huh? So tell me where I'm going wrong. No matter what I try I can't get a bump or touch event to call on a flockpawn. Has anyone ever messed with them like this?

Let's say I want the bird to damage you if it flies into you. Sounds simple enough, but dammit if I can cross that coding chasm.
 
Last edited:

MrLoathsome

New Member
Apr 1, 2010
100
0
0
As far as I know the only event you can get from any of the flockpawns
is when a bird dies.

However, there is always more than 1 way to do most anything....;)

If you project is such that you can either add a class, or replace the
existing birds with a class that has extended them, feel free to use these
dambirds. Wrote them up just a few minutes ago just for you.

They should behave exactly like the default birds, however if they
bump a player he will lose 15 health.
(I know, I know. The code would indicate 10. Ask Epic.....:stick:)

I did bump the default health for them up to 50 from the 17 the original
birds have. You can easily adjust either of those values as you wish.

As is, they will damage Players, Bots and Monsters if they bump them.
They will not currently damage each other.
Any of that could be set as needed via minor adjustments to that If
statement.

To use, just summon DamBird.DamBird. Or use a mutator to add them.
Or whatever you is be doing......

See attached for download.

Full DamBird Source:

Code:
//=============================================================================
// DamBird by Mr.Loathsome  1/18/12
//=============================================================================
class DamBird extends Bird1;

function Timer()
{
	enable('Bump');
}
function Bump(actor Other)
{
	if (((PlayerPawn(Other) != None) || (ScriptedPawn(Other) != None)) && (Pawn(Other).health > 0))
	{
		Other.TakeDamage(10, self, Other.location, vect(0,0,0), 'Beaked');
		disable('Bump');
		SetTimer(1.0, false);
	}
}

defaultproperties
{
     Health=50
}

Enjoy ! Hope it is useful for you.
 

Attachments

  • DamBird_v1.0.zip
    1.4 KB · Views: 4
Last edited:

gopostal

Active Member
Jan 19, 2006
848
47
28
Isn't it amazing how Occam's Razor is so appropriate when you code? Your mod didn't work, but it's my fault. Let me explain a bit, and thank you for your help.

I have a wonderful girl that runs my website for me. She does all the behind-the-scenes stuff, keeping the portal page updated, etc. She's also a BR mapper (UT version) and she made a Quidditch map. I helped her sort a couple of brush problems but I mentioned that the map needed those things that fly around (a snitch and bludgers I was soon to find out) to be a real Harry Potter map.

Sooo, to help her I whipped up a both and added them to the map. She loves them but wanted to know if the bludgers could knock the SLV's out of the air. That's where I was stuck. No matter what I tried I couldn't get damage called on any touch/bump. So I tried yours and still no joy. Finally I came to my senses and backed off, applying Occam.

My problem was that the bludgers fly through the air so I was using "fly" to reach them. Well, that disables the bump (derpface) so no damage was called. Once I put them on the ground and bumped them *BAM*, bludgeoned.

So now that's all sorted I'm making them unkillable and adding some custom messaging. I'll make the snitch add health if you can grab it (which is VERY hard on an SLV) and overall I'm quite happy with where this went. When it's all done I'll release the two as a mod with source code notes since this makes a pretty cool effect and I can see the flying community having some interest. You could do a hell of a lot of stuff with this from enemies to moving targets to moving goal events, really whatever you wanted and it works.

I appreciate the assist. I'd have been hard stuck for longer had you not posted this.
 

MrLoathsome

New Member
Apr 1, 2010
100
0
0
Cool. Glad I could be of help.

Now that you got your SLV issues resolved, I am gonna hijack your
thread a bit, but it is your fault.

Let's say I want the bird to damage you if it flies into you.

Did you just think of that when you were writing that post?

Great idea.

I have been testing something else out the last few weeks and just for
kicks, I added some of those DamBirds into the games via my Dropper
mutator. (Just a few, not huge swarms of them...)
Summoning a few into a game will put them at the same general location
as far as Location.Z is concerned.

Been testing on DM and SP/Coop maps with bots, monsters and zombies.

When they spawn, they do their various loops and swoops pretty much
mostly within player collision height range. Even on huge or "outdoor" maps
they don't just fly away. They bump into things much more often than
I expected.

Figured they would cause issues on a small map like DM-Fetid, but they
didn't...

If you get some spare time, you should try them and check out how
they play.

I tested them at least 6-8 hours, and can't get an error or problem out of
them. Been reading the logs close. Only 1 bird related warning, regarding
"Sequence 'Fighter' not found in Mesh bird1".
Seen that before, and it happens so infrequently, I ain't gonna fix that.
(Its not an Accessed None...:D) That one is on Epic.

I was also very surprised that scriptedpawns and bots work with them as well
as they do.
Think they are ready for people to play with or use in new maps.

Can't think of any change that needs to be made to the version above in
post 2.

These DamBirds are done.

Again, great idea there.
 

gopostal

Active Member
Jan 19, 2006
848
47
28
I'm pretty close on this, I just need to sort out replication and a couple of small behavior issues. Offline it works perfectly. The bludger chases and smashes you if it can catch up. It has a 'patrol area' you can assign and even if it follows you across the map it will return to there if it loses or kills it's target. It scans in a 750 unit halo with a 1000 unit 'lost target' limit. If you can get that far away it loses you. Everything is configurable and I added a speed multiplier with target lock-on if you want the ball to smash-on-sight. The snitch works well too. In the air it's very hard to bump but if you can manage to do that it gives you full health.

The problem I'm running into is dealing with the replication. Since so much of flockpawn is simulated I'm having to sort out the parts to replicate to everyone. As usual this part gives me fits, I don't know why replication is so hard for me to wrap around. I think I would have been better off to subclass projectile for this if I had it to do over.

Anyways here's a demo video and once I get the online stuff sorted out I'll post it up: http://www.youtube.com/watch?v=3iJjT1njh0k
The first map is the one it was made for, the second is just to let it plow through some bots.
 

MrLoathsome

New Member
Apr 1, 2010
100
0
0
Just took a few minutes to watch your vid.

Looks very cool. Very smooth tracking of the victim by the bludger thingy.