You may want to mention on the changelog page that you need to download the pack ZIPs directly to the packs folder and not extract them individually the way I initially did lol.
Printable View
You may want to mention on the changelog page that you need to download the pack ZIPs directly to the packs folder and not extract them individually the way I initially did lol.
The Halo 4 medals look the best, but the Halo 3 announcer sounds the best. The Halo 4 announcer is so quiet. I guess I'll have to swap around some audio files, but I suspect not all of them will scale to Halo 4. Oh well, some are better than none.
EDIT: Upon inspecting the lua files and audio files, it appears that there are medals in the Halo Reach folder that did not carry over to Halo 4. I assume that is because Halo 4 never used them? I guess I'll be making my own custom pack out of these to include them, even if the style of the images are mismatched. Thanks for the template packs.
No problem. I'll adjust all three to try to bring them in line with the Halo 1 announcer. As a note, the volume is tied to the game's master volume control.
The Halo 4 pack has all of the medals that were included in the Reach pack with the exception of perfection (it's a commendation, although you could script that in). I see that I accidentally left in a couple of test images though. :golfclap:
I noticed a "Headshot" medal in the H4 pack that was never called in the script.
Assuming detecting the user getting a headshot is currently not possible?
Can't wait to see the documentation
I feel like headshots are something the server would know about but the client wouldn't.
yeah I'm not too concerned about detecting headshots for now. Would be nice, but I'd imagine it'd be difficult to detect. Maybe if it detects the headshot death animation playing on the victim from the client's end?
I'm honestly surprised and fairly delighted that at the ability to detect other players' sprees for the Killjoy medal. I didn't expect that!!
could you do a custom chat without the new line animation?
oh right LOL
I've seen some servers spew out: "PlayerA's spree was ended by PlayerB". So there is some way they are tracking it.
There's "killing spree" and "running riot", so the game itself tracks it anyway. I can't imagine it would be too hard to internally keep track of kills each player has in a row. Increment the counter every time they get a kill, set it to 0 every time they die. Seems easy enough.
E: you'd need to keep track of that in real time though, because Halo is not a zero-sum game. You cannot just use the kills and deaths of each player on the scoreboard because players can join, leave, and kill themselves at any point in time.
"Obviously", assuming there was something in the game's scoreboard tracking the fact that hey, five kills ago they were still at 6 deaths. But again the game's scoreboard doesn't track that. There's no 4th dimension to the stock stats. However, as others have pointed out, part of the game does track the killing spree of players (stored in the same game state as the player's name, speed, etc). I'm assuming this is what Btc exposes to the scripts. So what was to m00k's surprise would have no relation to just "look at the score list to compare deaths and kills". That was my overall point.
I don't know if Btc's system handles players leaving then rejoining. If he uses the method we discussed a while ago (keeping a copy of the relevant game state instead of referencing it directly in the scripts) then he could 'easily' cache old player information for later. However, leaving should still count as a silent death to the game engine, and in any case should reset any spree they had at the time.
I'd need to look at it again but I believe the script actually increments the value on variables and detects streaks off of those.
spree = spree + 1
deathspree = deathspree + 1
That kind of stuff. Not certain if player state data is used, I haven't dissected the scripts enough to tell.
When the feature to require HAC2 in a server is released, will there be an option to disable checking the cheaters ban list? I'd like to have HAC2 required for my custom map servers for both the downloading aspect and the draw distance aspect, but I absolutely hate using global ban lists on my servers. I prefer complete control of who can and who can not play on my servers.
I'm not supporting cheaters by any means, but I just don't want something on my server that I have no control over. (I always disable VAC in my Steam servers for this very reason).
Hello - - - >>> https://www.youtube.com/watch?v=cUfS1hHzFKY <<< - - -... i found this if helps to bring more medals and announcements , i tried myself , but i don't know where i'm doing it wrong.... i replace the sounds and images , also add new ones :-3.... after archive them... i put them here C:\Documents and Settings\DJ\My Documents\My Games\Halo CE\hac\packs .... try to load .....unable to load optic pack.. i can't find a tutorial... so good luck with this , and bring more badass multiplayer action :realsmug:.
You need a LUA script to go along with it. You can't just add images and sounds to an archive by themselves and expect it to work.
The documentation has not yet been released.
Your best bet is looking at the files inside of the zip files, making a copy of your own, and figuring out how they work. It's fairly simple to understand if you have any scripting knowledge at all.
Yeah... i'll learn more about LUA and scripting , and see what comes out :raise: , thanks for the quick answers.
Another feature request...
What about something where SAPP Server owners can set an IP Address of a TeamSpeak, Mumble, and/or a Ventrillo server, and HAC2 can automatically connect to the servers, as well as optionally automatically go to a specific channel on those servers as well?
That's already partially implemented but I'm not sure whether it'll end up being released. Teamspeak has an SDK that would allow for integration with Halo but it'd bloat the HAC client too much.
The initial work was getting Teamspeak and Ventrilo to launch in the background upon joining a game with an associated VoIP server. I didn't look into Mumble, although I can't imagine there being much of an issue getting it to work in the same way.
Quick question:
I got 11ms ping to the server I usually play on and since the server has sapp's custom thread cycle enabled I get out of sync* alot.
I recon that the halo client should know whether it's in sync or not because the packets from the server probably stop coming in or something like that when the sync is lost.
So here is my question:
Could you please build me a debug version of hac2 that maybe tells me everytime I receive whatever information is send from the server to update my clients position?
So that I would know, when those packets stop getting in, I am out of sync.
Ofc the other way around would be ok too, that it just says "You're out of sync" whenever the client doesn't receive any updates from the server anymore.
*Basicly I walk around in the map but I can't pick-up anything nor can I shoot anyone or get in vehicles and about 30 seconds later my client syncs with the server again and I get warped to the place the server thinks I am.
The thing that is a little bit frustrating is that unless I try to pick something up I don't actually know if I am in sync with the server or not.
It doesn't happen on servers where I got 24ms or higher. Just with the very low ping servers.
Critical Bug: When SJing a player, if the target is killed, HAC2 jumps to a random player on its own without warning or displaying that it is.
Proof:
http://social.xfire.com/video/62ac8a
This looks awesome. I'm so happy to see that there is still a somewhat active community that supports Halo PC/CE. Currently planning to put together some new servers and cannot wait to put these tools to work!
buuuump
whats happened to the hac2 :(
a certain someone in #modacity has no time to fix thing so deal with it :(
please fix hax2 website i needed it on the weekend and had to get tnaass to send me his copy
HAC has had some problems with a third-party server that decided to disappear from the Internet for several days. I did what I could restore services (the server actually used for HAC was still available) but the changes took a while to take effect.
The site is still unavailable apart from a temporary message but HAC itself should be working normally. The updater should have started working ~8 hours after the initial outage and the map downloading service was restored for everybody on Sunday.
It's not acceptable (or intended) for the updater to cause the game to fail to work when run in fullscreen mode. There's an overhaul of loader.dll in the works but it could be a few more weeks until it's ready. There are also changes to the map downloading service in the pipeline.
If you're still having issues, let me know and I'll do what I can to help.
</copypaste>
TL;DR - servers relied on a single third-party server that was being used for DNS records and that server fell over, bringing everything else down catastrophically. The code in loader.dll is bad and is being overhauled.
Any chance you can add some kind of an option for server owners to host their own maps repository for the maps they use on their server(s)? Would take some strain off you needing to provide the files and keep the map files up to date.
Seems like a win-win IMO.
Can it check the checksum against what the client currently has? If it's the same don't download, if it's different re-download?
Not without the self-hosted map repos having some kind of script. The plan is to just allow server operators to use SAPP or Phasor to add an extra key to the server's query response with the address of a map folder. If HAC can't find the map on its own system, it'll look in the server's folder instead.
Ah OK. That works I suppose.
Would maps just be distributed via HTTP or is there some internal protocol? AKA would servers need to run a web server with a publicly accessible maps folder somewhere?
Just HTTP, nothing fancy.
If admins wanted, they could allow access based on HAC2's user agent to stop casual leeching. The folder doesn't need a public listing, maps will be requested directly by name.
Map downloading isn't working (checked a few min ago) and hac download page shows 404.
Anyone else getting random exceptions?
Could of been the zombie server I've been playing om then. I'll play on different servers and see.
I have no other modifications installed so it is strange.
blog.haloanticheat.com gives me:
Error establishing a database connection
I was checking to see if you added a feature to toggle the chat :P
Hey, I'm sorry if this has already been addressed, but is it possible to direct HAC to download to the Halo Custom Edition\maps folder instead of the folder created in My Games\Halo CE\hac\maps?
On it. :)
Afraid not. The best you can do is run the game as admin and it'll move the maps from hac\maps to your game's maps folder. It works the way it does because you can't write to Program Files without admin permissions, unless you want the maps to end up being saved somewhere where nobody can find them (Virtual Store folder, like OpenSauce does).
H-Ext from 0.5.2.3 and older too has this issue for Virtual Store when should be in Halo's installion directory.
Running the game as admin is NOT recommended unless you want users to easily allow malware to infest their machine into total destruction. However, there is a solution to fix is to patch halo's executable with a manifest as I posted awhile ago without the need to run as admin. Or to disable the UAC.
LOL, first you recommend not running as admin, then you say "just disable UAC".
lmao.
I said or... which I do not recommend either.
I am well aware of Halo isn't a virus. However, the users aren't aware of modules, what you so called "extensions", can be easily infected right inside the Halo's directory at any time. So, once a user running Halo as admin then the whole machine will easily get infected either locally or through network. My apology for my recent incomplete post, I meant to say it was a suggestion except for what you suggest your HAC users to run as admin isn't recommended like all other people in antivirus companies would say. Your method for putting maps in "My Games\hac\maps" folder while under virtualized is just fine and easier to find than VirtualStore folder (UAC) method...
Patching a halo executable with a manifest WITH "asInvoker" defined does not elevated privileges at all unless the user decide to run as administrator via right-click's context menu. Plus will tell if the user have permission to write into the Halo's directory or not.
btcc, thought...
In conjunction with sehe / SAPP, do you think it would be possible to have SAPP trigger audio that plays on client systems (custom files downloaded on connecting to server if required via HAC2). For example, you could define a zone in SAPP, if you walk into it an audio file would play.
Just a thought for expanding the features of SAPP / HAC.
It'd be possible, I suppose.
I could see it conflicting with kill-packs though. If you do implement something like that, HAC2 should have a toggle to switch between local or server sound pack options or something probably. Or a way to disable server sounds if clients don't want them at all.
I just think it would be cool to implement custom kill-streak messages that are done server-side. Ex: Could have the Unreal Tournament sounds play for certain things. Audio warnings for entering disallowed zones could be handy for certain things.
Honestly, I can see a lot of uses haha.
I had thoughts of allowing servers to send (sandboxed) medal packs to players but I wanted to have a more complete API available first. That's easier said than done though.
*cringes*
Just had a flashback of when I used to play CS 1.6 and every time I would launch it from a new PC it took forever to join servers because they all had a shitload of custom sounds and stuff that needed to be downloaded beforehand.
That being said, times have changed and internet speeds are (generally) much faster. If these server-side sound packages could be limited to a certain size, it could be interesting.
My thoughts exactly. I wouldn't mind showing / playing things for the custom game modes I'm running. Gungame, Warthog Slayer, etc.
I'm down for it, just long as there are restriction apply how much custom pack(s) download to client side with size limit like stunt_man said (including optional like you said, Btcc). Just wondering what others might think, have an option to keep the downloaded custom pack so don't have to re-download? Of course with checksum validation check to be sure the custom pack is up-to-date or is using the same as the server's.
Yeah, I hate when that happen. However, similar issue I have is with Garry's Mod servers downloading custom packs which is insanely too much of them.
P.S. Still seeing "Error establishing a database connection" on your blog.anticheat.com section, just a fyi.
Had a completely out of left field idea. :beer:
This would require some working with SAPP as well, however... what about an in-game reporting/admin calling system? A SAPP server owner can setup something where they put the XFire IDs of moderators/admins into a config file or something like that, and if you have HAC2 and XFire, you can type the /report command into the servers chat, which will then work both server and client side, where the server will send the XFire IDs of the listed moderators/admins to the clients HAC2, which will then communicate to the clients XFire to send a pre-written message to an online moderator via XFire to join the server at IP xxx.xxx.xxx.xxx:yyyy for a report against player New001 from player New002. Of course, a server can turn this feature on/off, but this may be something worth looking into. I've seen something similar to this before in different games, and I don't see why HAC2 couldn't make this possible with Halo and SAPP. Of course, you'd need flood protection as well, and maybe a server variable could be added where the message could only be sent after x amount of reports.
Also, is there eventually going to be something where a server owner can require players to have HAC2 when they join their server?
Or better yet, notifications by email. That way we don't really need a specific IM client.
The Xfire notifications is a nice idea but I think it'd be too time-consuming for it to be worth it. Aside from the technical issues, doesn't Xfire require you to be friends with somebody before you can message them? I'm using an old client where that's the case but perhaps something's changed that I'm not aware of.
Email notifications would be quite easy to implement in SAPP/Phasor but email probably isn't the best delivery mechanism.
This would be really easy for Oxide and/or Sehe to implement in their mods. I'd add the needed stuff to HAC if they were willing to add such a feature.
I don't know. I know that you can message friends of friends and people in rosters of groups that you're in even if they're not your friend, but I don't know to what extent it goes. There's also the option of an XFire chat room... IRC might not be an impossible venue either...
Yeah, that'd be sweet.Quote:
This would be really easy for Oxide and/or Sehe to implement in their mods. I'd add the needed stuff to HAC if they were willing to add such a feature.
Like mywarthog said about xfire. I would like to extend this a bit, I had heard one of the gaming company did that. However, didn't successfully connect to a game server for players to make the reports due to lack of mod support back then.
I'm sure Oxide will not implement this type of feature in his Phasor except possibility extend network part of API to lua script for network communication (which is already done for sender, just haven't work on receiver part last time I checked). So, it's pretty much up to Phasor's community add this feature directly from lua script.
Very true, although shouldn't be hard with gmail or yahoo accounts since they do allow external smtp. Just doesn't allow alter email address other than it's own account name, or unless is using paid account which is possible with their domain name.
i keep getting exception error when i try to enable custom chat and medals.
any solutions to fix this?
Install this: http://www.microsoft.com/en-us/downl...s.aspx?id=8109
can I make hitmarkers yet? :crylancer:
Actually, I was wrong (ish). I did add a hacky way for you to add hitmarkers but I didn't enable it in the release version. Here's a test build with it enabled; rename it to hac.dll and drop it into your Halo folder. To use it, have your Lua script register for the 'HIT_DETECT' event.
If you want your hitmarkers to be animated, you'll have to use a spritesheet. Since I haven't documented that function anywhere, here's the signature:
There's an example of using them in the Halo 4 medal script.Code:const std::string& name,
bool loop,
int rows,
int columns,
int fps, // framerate for playback
int blanks, // number of blank frames at the end of the spritesheet
int loopBegin // frame # to begin loop playback from
Code:create_animation("blue_flash")
add_keyframe("blue_flash", 0, 0.85, 4)
add_keyframe("blue_flash", 0, 1.3, 0)
add_keyframe("blue_flash", 150, 1.0, 0)
create_sprite("blue_flash", "images/h4glowsprite.png", "blue_flash")
sprite_properties("blue_flash", false, 1, 4, 30, 0, 0)
!
Dude you're the best. I'll check this out.
I'm not seeing a way to reposition the sprites to the center of the screen. Is this possible?
Also can we change the font on the custom chat?
Can you make this an app in the windows store
Silly me, I seem to have forgotten how to load packs. Seems the blog has been down for a while.
E:
Found a decent resource.
http://halosources.blogspot.com/2015...ate-guide.html
Here's a list that I have compiled over the years.
I have no idea why the horizontal scrolling isn't showing up in the post, but in post preview it does. Sorry about that.Code:Key shortcuts (will be configurable in the near future):
Bookmark controls:
F4 – Add current server to bookmarks.
F5 – View bookmarks.
Alt + bookmark number - Join bookmarked server.
Delete + bookmark number – Delete a bookmark.
Ctrl + Alt/Delete + bookmark number – Selects bookmarks in the range 11-20 (example, ctrl + alt + 4 will join bookmark 14).
Field of view controls:
F6 – Change field of view. Move the mouse up/down to control it. Press F6 again when you’re done.
Left shift + F6 – Reset field of view to the default (70).
HUD colour controls:
F9 – Set the HUD colour.
Shift + F9 – Reset the HUD colour
Sightjacker controls:
F7 – Enable/disable the sightjacker.
Console Commands:
hac_widescreen 0/1 Turn HAC 2’s HUD scaling fix on/off. The default is on.
scope_blur 0/1 Toggle between the blur effect when using scopes in scoped weapons.
play_during_queue 0/1 Allows you to remain in the current game until a free slot is available in the bookmarked server you attempted to join.
draw distance Distance is the number of world units to draw. The default is 1024 and HAC uses 4096 for maps that benefit from increased draw distances.
recalculate “map name” Recalculates the checksum for the given map. This is aimed at map makers that don’t want to use the cached checksum during development, given that the checksum will change with each compile. Use quotation marks for map names with spaces.
budget_show 0/1 Displays the current number of BSP polygons being drawn and the remaining default/HAC budget. Once the limit is hit, any polygons that’d push the budger over the limit will appear has gaps in the geometry.
fov value in degrees Can be used as an alternative to F6 for setting your field of view.
hac_flush_cache Clear the entire checksum cache. There’s no real reason to use this but it’s there anyway.
copy Copies the information for the current server to clipboard. This is useful for pasting the connect ip:port password information over Xfire/Steam etc.
copy bookmark number Same as above except it copies the information for a bookmarked server instead of the current server.
devmode 0/1 Toggles devmode on Halo CE.
custom_chat 0/1 Toggles custom chat.
font_size Changes font size for custom chat.
optic Display all available medal packs.
optic load <pack name> Load a medal pack. For example, optic load halo4.
optic unload Stop the medal system. You do not need to use unload to simply load
visible_objects <number> Control the number of objects drawn. Most users will have no need for this command.
Hey Btcc22, created an account just to ask if or when will Halo anticheat 2 get offline support? I keep getting "Update error! Invalid network address" when trying to boot Halo PC offline.
Try this.
Thank you so much! I''ll make sure to bookmark this page in case for the future!
I've tried experimenting with the coords, and I'm not certain which value does what. I'm hitting situations where messing with the values and removing keyframes causes absolutely nothing to appear on screen.
"add_keyframe("h4_ani", x, y, z)"
What do X Y and Z equate to?
The name of the animation that the keyframe belongs to, the time (e.g. 1000 for 1 second into the animation), the value for the transform and the transform type.
For example, from the Halo 4 script:
This animates the size of the medal over the first 90ms of the animation. It starts off at 200% size and stays that way for the first 30ms. It then shrinks to normal size (1.0) over the subsequent 60ms.Code:add_keyframe("h4_ani", 0, 2.0, 0)
add_keyframe("h4_ani", 30, 2.0, 0)
add_keyframe("h4_ani", 90, 1.0, 0)
The transform types are:
There are two other versions of add_keyframe that you'll see elsewhere in the other scripts that take more arguments.Code:KEYFRAME_SCALE, (0, does this X and Y at the same time)
KEYFRAME_SCALE_X, (1)
KEYFRAME_SCALE_Y, (2)
KEYFRAME_ROTATION, (3)
KEYFRAME_OPACITY, (4)
KEYFRAME_RED, (5)
KEYFRAME_GREEN, (6)
KEYFRAME_BLUE, (7)
KEYFRAME_POSITION_X, (8)
KEYFRAME_POSITION_Y (9)
};
The tween type allows you to control the interpolation between keyframes and the accepted values are:Code:add_keyframe(same, same, same, same, tween type)
If none of the provided tween types given you the animation that you want, you can provide your own bezier curve values. You can find a nice little tool over at http://cubic-bezier.com. Just mess around with the curve there, find something you like and then plug the values in.Code:LINEAR, (0)
EASE_IN, (1)
EASE_OUT, (2)
EASE_IN_OUT (3)
Code:add_keyframe(same, same, same, same, curve value #1, curve value #2, curve value #3, curve value #4)
Surprisingly speedy reply. This system is far more intricate than I thought! All of this info is exactly what I was looking for, thanks so much for the clarification
Quick mockup. Lots of unnecessary lines.
https://dl.dropboxusercontent.com/u/...arkers_1.0.zip
I don't have HCE installed on my PC at home hilariously enough, but it functions!! Though my game exceptions every now and then... Not certain if it's caused by the pack or what
Code:api_version = "1.0.0"
--[[
I did add a hacky way for you to add hms but I didn't enable it in the release version.
Here's a test build with it enabled; rename it to hac.dll and drop it into your Halo folder.
To use it, have your Lua script register for the 'HIT_DETECT' event.
If you want your hms to be animated, you'll have to use a spritesheet. Since I haven't documented that function anywhere, here's the signature:
const std::string& name,
bool loop,
int rows,
int columns,
int fps, // framerate for playback
int blanks, // number of blank frames at the end of the spritesheet
int loopBegin // frame # to begin loop playback from
There's an example of using them in the Halo 4 medal script.
create_animation("blue_flash")
add_keyframe("blue_flash", 0, 0.85, 4)
add_keyframe("blue_flash", 0, 1.3, 0)
add_keyframe("blue_flash", 150, 1.0, 0)
create_sprite("blue_flash", "images/h4glowsprite.png", "blue_flash")
sprite_properties("blue_flash", false, 1, 4, 30, 0, 0)
]]--
function register_callbacks()
create_animations()
register_callback(cb['HIT_DETECT'], "hit_detect")
--register_callback(cb['PLAYER_KILLS'], "player_kills")
end
function display(message, name, sound, low_priority)
low_priority = low_priority or false
hud_message(message)
queue_audio(sound, low_priority)
display_medal(name)
end
function hit_detect(event, killer, victim, player, timestamp)
if(killer == player) then
--if weapon has small ret
--display("Hit!", "hm_Small", "audio/hm_default.wav")
--if weapon has large ret
display("Hit!", "hitmarker_small_medal", "audio/hm_default.wav")
end
end
--[[function player_kills(event, killer, victim, player, timestamp)
if(killer == player) then
display("Kill!", "hitmarker_large_medal", "audio/hm_killshot.wav")
end
end]]--
function create_animations ()
create_animation("h4_ani")
--add_keyframe("h4_ani", 0, 2.0, 0)
--add_keyframe("h4_ani", 30, 2.0, 0)
--add_keyframe("h4_ani", 60, 1.5, 0)
----add_keyframe("h4_ani", 90, 1.3, 0) --originally commented
--add_keyframe("h4_ani", 90, 1.0, 0)
--add_keyframe("h4_ani", 0, 0.2, 4)
--add_keyframe("h4_ani", 30, 0.2, 4)
--add_keyframe("h4_ani", 90, 0.75, 4)
--add_keyframe("h4_ani", 1620, 0.75, 4)
--add_keyframe("h4_ani", 1710, 0.0, 4)
--add_keyframe("h4_ani", 1710, 0.5, 0.5)
add_keyframe("h4_ani", 0, 0.49, 8)
add_keyframe("h4_ani", 0, 0.52, 9)
add_keyframe("h4_ani", 0, 1.5, 0)
add_keyframe("h4_ani", 100, 2, 0)
add_keyframe("h4_ani", 0, 1, 4)
--Main animation
create_animation("main")
add_keyframe("main", 100, 1, 4)
--add_keyframe("main", 0, 0.010, 8)
--add_keyframe("main", 0, 0.49, 9)
add_keyframe("main", 0, 1.0, 0)
add_keyframe("main", 1710, 1.0, 0)
--Slide animation
--create_animation("slide")
--add_keyframe("slide", 0, 0.0, 8)
--HitMarker Large
create_sprite("hitmarker_large", "images/hm_large.png", "h4_ani")
create_medal("hitmarker_large_medal", "main")
attach_sprite("hitmarker_large_medal", "hitmarker_large")
--attach_sprite("hitmarker_large_medal", "blue_flash")
--medal_slide_animation("hitmarker_large_medal", "slide")
--HitMarker Small
create_sprite("hitmarker_small", "images/hm_test2.png", "h4_ani")
create_medal("hitmarker_small_medal", "main")
attach_sprite("hitmarker_small_medal", "hitmarker_small")
-- attach_sprite("hitmarker_small_medal", "blue_flash")
-- medal_slide_animation("hitmarker_small_medal", "slide")
end
Updated Hitmarkers. Got Kill Markers working!!! Cleaned up the code a ton
I'm still running into occasional exceptions. Like one every two to four games. I wouldn't really feel safe releasing this to too many people in this state.. Uncertain if it's Optic or my script
![]()
![]()
https://dl.dropboxusercontent.com/u/...markers1.1.zip
You like that shit Rent?Code:api_version = "1.0.0"
kills = 0;
function register_callbacks()
create_animations()
register_callback(cb['HIT_DETECT'], "hit_detect")
register_callback(cb['PLAYER_KILLS'], "player_kills")
end
function display(message, name, sound, low_priority)
low_priority = low_priority or false
hud_message(message)
queue_audio(sound, low_priority)
display_medal(name)
end
function hit_detect(event, killer, victim, player, timestamp)
if(killer == player) then
if(kills == 1) then
display("Kill!", "killmarker_medal", "audio/hm_kill.wav")
kills = 0;
else
display("Hit!", "hitmarker_medal", "audio/hm_hit.wav")
end
end
end
function player_kills(event, killer, victim, player, timestamp)
if(killer == player) then
kills = 1;
end
end
function create_animations ()
--Hitmarker Ani
create_animation("hitmarker_ani")
add_keyframe("hitmarker_ani", 0, 0.49, 8) -- x pos
add_keyframe("hitmarker_ani", 0, 0.52, 9) -- y pos
add_keyframe("hitmarker_ani", 0, 1.5, 0) -- scale
add_keyframe("hitmarker_ani", 100, 2, 0) -- scale
add_keyframe("hitmarker_ani", 0, 1, 4) -- opacity
--Main Hitmarker
create_animation("main_hitmarker")
add_keyframe("main_hitmarker", 0, 1.0, 0) -- scale
add_keyframe("main_hitmarker", 1710, 1.0, 0) -- scale
add_keyframe("main_hitmarker", 100, 1, 4) -- opacity
--HitMarker
create_sprite("hitmarker", "images/hm_hit.png", "hitmarker_ani")
create_medal("hitmarker_medal", "main_hitmarker")
attach_sprite("hitmarker_medal", "hitmarker")
--killmarker Ani
create_animation("killmarker_ani")
add_keyframe("killmarker_ani", 0, 0.49, 8) -- x pos
add_keyframe("killmarker_ani", 0, 0.52, 9) -- y pos
add_keyframe("killmarker_ani", 0, 1.5, 0) -- scale
add_keyframe("killmarker_ani", 100, 2, 0) -- scale
add_keyframe("killmarker_ani", 0, 1, 4) -- opacity
--Main killmarker
create_animation("main_killmarker")
add_keyframe("main_killmarker", 0, 1.0, 0) -- scale
add_keyframe("main_killmarker", 1710, 1.0, 0) -- scale
add_keyframe("main_killmarker", 100, 1, 4) -- opacity
--killMarker
create_sprite("killmarker", "images/hm_kill.png", "killmarker_ani")
create_medal("killmarker_medal", "main_killmarker")
attach_sprite("killmarker_medal", "killmarker")
end
E: Fixed video..
E2: Pix
I should note it seems to occur most with things like an SMG or something with a high ROF. I haven't hit it in, say, a sniper server
oh, also.. I have since changed the code in the download link tie the killmarker directly to the kill detect, rather than setting 'kills = 1' and running it from the hit detect if kills == 1.
I haven't tested it much since I updated it, couldn't tell you if it still exceptions. has it been working fine for you?
Oh also, side question: When multiple medals are called, is it possible to prevent the medal from sliding to the side?
So I've narrowed down what was crashing, it was something on my end.
I was attempting to replace the hitmarker with a kill marker when a shot kills, which resulted in strange inconsistencies, as the hit/kill can come before and after one another.
This code was crasing:
This, more straight forward although a bit grosser causing two medals to call simultaneously, is not crashing.Code:function hit_detect(event, killer, victim, player, timestamp)
if(killer == player) then
if (kill == 1) then
display("Kill!", "killmarker_medal", "audio/hm_kill.mp3");
kill = 0;
else
display("Hit!", "hitmarker_medal", "audio/hm_hit.mp3");
end
end
function player_kills(event, killer, victim, player, timestamp)
if(killer == player) then
kill = 1;
end
end
Code:function hit_detect(event, killer, victim, player, timestamp)
if(killer == player) then
display("Hit!", "hitmarker_medal", "audio/hm_hit.mp3")
end
end
function player_kills(event, killer, victim, player, timestamp)
if(killer == player) then
display("Kill!", "killmarker_medal", "audio/hm_kill.mp3")
end
end
That shouldn't cause a crash (not possible, in theory) and I wasn't able to reproduce it but I'll run a few tests with that snippet of code to be sure.
Not certain if this is anything you can fix on your end, but it appears as if running "multiplayer_hit_sound_volume 0" completely disables hit detection. Seems more like something built into the CE engine
cool bro cool~
any idea when this update is going to be pushed out to everyone?