UE3 - UDK Dealing Damage

  • 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.

Robject09

New Member
Nov 4, 2009
37
0
0
Right... well I'm nearing the end of my level mod and there's just one major problem that I need to solve before I call in the testers (aka mates).

Basically I have a giant dragon head that breathes fire when a player stands in front of it. The sequence is activated via a trigger and I have used Kismet to get the trigger to deal damage to the player whilst they remain within the trigger's radius.
The problem that I didn't foresee is that for ANY player in touching the trigger ALL players get hurt. From looking at the properties of the player object I realised this is due to "bAllPlayers" being checked, but if I uncheck it NO ONE gets hurt.

From what I can tell I will need to use "PlayerIdx" somehow. Is there a way to return the Player ID (of those touching the trigger) as a variable to be used to determine who get hurt?

I'm worried I'll have to go into some programming... which I haven't done any of since 2006 and NEVER in Unreal :s - Don't even know where I find UnrealScript!

Please help!!!
 

Robject09

New Member
Nov 4, 2009
37
0
0
I'm away from my main com for a few days but I will deffo give this a shot when I return... My only worry is down to the movement of the dragons head, as I have it moving around in a 360. Is it possible to apply a movement track to a physics volume within a matinee?
 

Sjosz

(╯°□°)╯︵ ┻━┻
Dec 31, 2003
3,048
0
36
Edmonton, AB
www.dregsld.com
Make your volume a DynamicPhysicsVolume, make sure it sits in the right location relative to that rotating dragon head, and then in the properties of the DynamicPhysicsVolume, under sub-category Attachment, set the dragon head interpactor as the Base. (select DynamicPhysicsVolume, open properties, flag the lock actors button so you can freely select the dragon head while having the properties of the volume open)
 

Robject09

New Member
Nov 4, 2009
37
0
0
KICK ASS!

Well you've both helped massively. The damage dealing now seems to work fine and only to the players in the volume.

But sadly....


...Just discovered another issue on the same "calling all players" problem regarding sound and camera shaking.

The dragon also has a roar animation, which also causes players' cameras to shake if they are too close. I had been using "get distance" and float variables to determine if the effects occur or not, and to what extent, which worked fine when testing single player. But again, when I "add bots", if an AI activates the roar and is close enough to get the camera shake I still get the shake even if I am nowhere near the dragon. The same problem occurs with sound, as I found simply using the dragon as a the target for sound to emanate from meant I didn't hear it unless I was especially close (probably because the mesh is so large). Thus I have used the players as their own targets for the roar sound to originate from.

I found a poor way around the sound problem - by making numerous invisible objects radiating out from the dragons location and using THEM as sound targets, but even if I did want to use such a method, which I don't, I still have the problem with the camera shake.

Is there, perhaps, any way of getting these effects to occur based on the centre of the dragon over a large area, but that dampens the further from the centre you get?

Looks like the noob is in your hands again :s And with that I am off to bed :p
 

Robject09

New Member
Nov 4, 2009
37
0
0
Well I had another stab at the sound issue today. Still no luck :(

I got all excited on discovering, if I place an ambient sound in the level rather than calling it within the "Play Sound" action's properties it has a radius and various properties that allow me to change the volume falloff etc.

This excitement was soon shot down, after half an hour of trying to get the sound to play by exposing the "PlaySound - Object" variable I just could not get it to trigger. I even tried making the target object "player" again but sound cues and ambient sounds just don't seem to work if they're in my level and not added to the "Play Sound" action via the generic browser :(

Any advice on any of these issues would be greatly appreciated:

1) How to get ambient sounds placed in my level, triggering rather than just looping, whilst keeping their radius and falloff properties.

2) Or how to increase the radius the sound can be heard at from a target object - if it's even possible this would be the best fix for me

3) How to get the camera shake to only effect players near the dragon head