Turok Games > Turok 2 Seeds of Evil

New BETA Update

<< < (6/6)

Jay Doomed:
Great updates really liking the raptor fest also and appreciate the hard work.

BehemothProgrammer:

--- Quote from: Edward850 on June 26, 2017, 01:47:52 AM ---
--- Quote from: BehemothProgrammer on June 25, 2017, 09:16:02 PM ---I found a problem that only happens in MP. OnDamage seems to be getting called twice, meaning everything is taking twice the amount of damage it should. Unless that's intended but I don't think it is. In SP it only gets called once.

--- End quote ---
Can't reproduce this. OnDamage only ever triggers once, and frankly only has one place it can be called.
If you are sure this happens, you are missing an important detail.

--- End quote ---

What I'm doing to get the result is attaching a script on a player or enemy that simply prints a message to the console when OnDamage is called.

Here is the .kpf file of it for you to be able to replicate it. https://www.dropbox.com/s/3okq8jd4iriad6y/test.kpf?dl=0
contents:

* defs/actors/player.txt - added the script component to the player def
* scripts/main.txt - added the line: #include "scripts/ScriptPlayer.txt"
* scripts/ScriptPlayer.txt - OnDamage prints to console
Here is a video of it happening in MP and then in SP. You can see whenever I get hit the prints to console happen twice at the same time in MP.


Thank you for taking the time to look into this I really appreciate it.

Edward850:
It's just a script issue it turns out. OnDamage internally is being called just once but the player has two script delegates setup for the same action, due to some weirdness in how players are setup in multiplayer, causing the script to be executed twice for one damage event (so you are still only being damaged once).
I'll see if I can stamp that out but it probably wont be in the next patch, due to the delicate setup needed for spawning players in multiplayer.

BehemothProgrammer:
Ah I see. No problem I can wait until it eventually gets patched and do a work around for it in the mean time. Glad that you know of it now. Thanks again for looking into it!

Navigation

[0] Message Index

[*] Previous page

Go to full version