PDA

View Full Version : Inverse PlayHit



lmoreault
02-25-2008, 09:12 AM
Hi,

I was looking at the UnrealScript API
and I only seem to find mutators functions.

What I want to know is if there are functions that could return stuff like the inverse function for PlayerPawn's class's PlayHit
but that would give
float Damage,
vector HitLocation,
name damageType,
vector Momentum

instead of letting me set them.

Thank you very much

ambershee
02-25-2008, 09:52 AM
I think you're likely approaching something in a very wrong manner. What exactly are you trying to do?

lmoreault
02-25-2008, 10:03 AM
I want to get some basic information about the PlayerPawn instance.

I just want to know when the main Actor gets hit and from where.

Blade[UG]
02-25-2008, 01:22 PM
First off, isn't PlayerPawn back in Unreal 1/UT99 days?

Second off, did you actually look in the file, because you described exactly a function that is already there that is what you want...

lmoreault
02-25-2008, 03:03 PM
I was actually looking at a document which I found out afterward that was about Unreal Tournament 1 (using UnrealScript).

You said that there is a function already included so I could get the information I am looking for, which one is it if you please ?

Thank you

Blade[UG]
02-25-2008, 06:15 PM
If you're replacing the Pawn with your own custom one, you can override the TakeDamage() call to get whatever info you need.. if not, you can use a GameRules NetDamage() function

lmoreault
02-26-2008, 10:55 AM
Thank you very much for this information.

1. Do you know where I could find good documentation on these functions ?

I only found an old outdated API documentation with deprecated functions....

Also, I have a couple more questions :

2. Will my "Mod" be compatible with other Unreal Engine powered games (such as Gears of War) ?

3. Once I will have done this Mod, will I be able to easily call some C++ DLL functions (that I have already done using Visual C++) ?

4. Am I dependent from the UnrealEd IDE to write / compile my Unreal Scripts ? If not, what editor would be the best ?

5. Is UnrealEd only available on the Unreal Tournament 3 Disc ?

Thank you very much once again, (as this help is greatly appreciated)
And sorry for these newbies questions.

ambershee
02-26-2008, 11:04 AM
Thank you very much for this information.

1. Do you know where I could find good documentation on these functions ?

I only found an old outdated API documentation with deprecated functions....

Also, I have a couple more questions :

2. Will my "Mod" be compatible with other Unreal Engine powered games (such as Gears of War) ?

3. Once I will have done this Mod, will I be able to easily call some C++ DLL functions (that I have already done using Visual C++) ?

4. Am I dependent from the UnrealEd IDE to write / compile my Unreal Scripts ? If not, what editor would be the best ?

5. Is UnrealEd only available on the Unreal Tournament 3 Disc ?

Thank you very much once again, (as this help is greatly appreciated)
And sorry for these newbies questions.

Sounds like you'd probably be better off doing some tutorials before diving in the deep end. Do you actually have UT3?

1) Generally, the code is well enough commented and easy enough to understand without the need for API documentation.

2) No. It doesn't share the same UScript code base, art assets, or the even the same engine build.

3) No. You won't be able to do it at all.

4) I use Notepad++. Unrealscript is just text files after all. UnrealFrontEnd will let you compile and log the output.

5) Yes.

lmoreault
02-26-2008, 11:10 AM
Thank you for the quick response ambershee.

Indeed I don't have my copy of UT3 yet, as I am looking around at thing that I could possibly do with it.

I am planning to do some sort of environmental feel to the game by adding external components controlled by the game's output.

If I get you right then, the only way to access the variables from UT3 via Unreal Scripting would be to log them in a file and access this file via my C++ Application ?

ambershee
02-26-2008, 11:13 AM
TCPLink is now implemented in patch 1.2 - which allows some transfer between applications - but it won't let you include an external library outright.

You're probably better off incorporating whatever it is you want within Unreal.

lmoreault
02-26-2008, 11:24 AM
What if I have my own (C++) application establishing a TCP Link with UT3 ? (using TCPLink)
Then I would be completely independent from UT3 (except from the data received via TCP)

Wouldn't I ?

Regards

ambershee
02-26-2008, 11:30 AM
It really depends on what you're trying to do.

lmoreault
02-26-2008, 11:40 AM
To make it easier...

Lets say that what I want to do is simply make a red light flash on my desk (driven by the LPT port / controlled by my C++ application) every time that I get hit in UT3 (by a bullet or explosion)

ambershee
02-26-2008, 11:51 AM
Should be feasible. There may be some delay between the event and the flash however.

lmoreault
02-26-2008, 12:44 PM
Is the logger "UnrealScript" way would be faster than TCPLink ?

If you have a clue.

ambershee
02-26-2008, 04:14 PM
Probably not. I'd go with TCPLink.

lmoreault
02-26-2008, 04:50 PM
Thank you once again ambershee :)

One last question (I swear it's true ;) )
Where can I find documentation about information available via TCPLink ?
Like available struct and things alike.

ambershee
02-26-2008, 05:12 PM
Read the code. Every function is documented if it needs to be in the code.

lmoreault
02-27-2008, 10:25 AM
Where is TCPLink's code that you are talking about ?

ambershee
02-27-2008, 10:46 AM
Patch 1.2. There hasn't been a code drop for it yet.

lmoreault
02-27-2008, 10:51 AM
Oh... so I see...

The patch as been freshly released with inclusion of TCPLink.
But there is no documentation yet on how to use the feature ?

So it's there... we can connect to it using a TCP connection... but then we don't know what or how to ask for once it's up ?

Again, sorry for my questions.

And thank you for your patience with me.

ambershee
02-27-2008, 11:16 AM
Yeah, it's a new feature.

I'm willing to bet there won't be any documentation, the same with the rest of the code base.

lmoreault
02-27-2008, 11:59 AM
It's fun though that they are adding a feature but that no one will be able to know how to use it.

Thank you for all your help ambershee

ambershee
02-27-2008, 12:04 PM
People will work out how to use it by reading the code and testing it out. AFAIK, people have already written a couple of programs using TCPLink by exporting the scripts from the editor and doing this.

lmoreault
02-28-2008, 08:17 AM
Will TCPLink in any type of game ?
Or would it be a kind of hack to use it that way ?

ambershee
02-28-2008, 08:42 AM
If you're talking about any game mode, yes you can create a TCPLink in any game mode.

lmoreault
02-28-2008, 09:13 AM
Excellent Thank you !

I just don't know where to get started with this, there are not tutorial anywhere and I don't want to just try connect using a TCP connection then send about any packets and look at the response (which will look like Raw meat since I won't no the structure of the data contained in those packets).

Nereid
02-28-2008, 05:31 PM
http://wiki.beyondunreal.com/wiki/TcpLink and http://wiki.beyondunreal.com/wiki/Creating_A_TCP_Client are good starting points. TcpLink works pretty much exactly as it does in UT2004.

lmoreault
02-29-2008, 09:15 AM
Thank you for the example Link.

I see in that example that the creator use the "Log" function.
What are the different variable that I could log ? (send to my external app)

ambershee
02-29-2008, 09:32 AM
Log has nothing to do with TCPLink. Have you actually done any UT modding? You should really do some basic stuff before attempting a complex project...