| Blockland Forums > Suggestions & Requests |
| Hitmarkers, I can provide a sound and graphic |
| << < (4/5) > >> |
| Pecon:
I suppose I could do it. I know how to get the texture to download as well. |
| .::Taboo::.:
Cool, thanks. Just a guess for future reference, but is it because they're not actually directly associated with anything as a datablock/shape/etc. so the game skips them over? |
| Pecon:
Yeah basically. I think it's done. I can't test it right now, but you can test it if you know how to package it. --- Code: ---datablock particleData(hitMarkerTexture) { textureName = "./hitMarker.png"; }; datablock audioProfile(hitMarkerSound) { fileName = "./hitMarkerSound.wav"; description = audioClosest3D; preload = true; }; package hitMarkers { function ProjectileData::damage(%this,%obj,%col,%fade,%pos,%normal) { parent::damage(%this,%obj,%col,%fade,%pos,%normal); if(isObject(%obj.sourceObject.client)) { %obj.sourceObject.client.centerPrint("<bitmap:add-ons/server_hitmarkers/hitmarker>", 1); %obj.sourceObject.client.play2D(hitMarkerSound); } } }; activatepackage(hitmarkers); --- End code --- Just put that into the server.cs of a folder called Server_Hitmarkers in your add-ons folder. Then put the texture and sound in as hitMarker.png and hitMarkerSound.wav And don't forget a description.txt, it can be empty. |
| .::Taboo::.:
No dice. Looks right to me, though.... --- Quote ---Loading Add-On: Server_Hitmarkers (CRC:1628934079) Add-Ons/Server_Hitmarkers/server.cs Line: 15 - Syntax error. >>> Some error context, with ## on sides of error halt: atablock particleData(hitMarkerTexture) { ^textureName = "./hitMarker.png"; }; datablock audioProfile(hitMarkerSound) { ^fileName = "./hitMarkerSound.wav"; ^description = audioClosest3D; ^preload = true; }; package hitMarkers { ^ProjectileData:##:##damage(%this,%obj,%col,%fade,%pos,%normal) ^{ ^^parent::damage(%this,%obj,%col,%fade,%pos,%normal); ^^ ^^if(isObject(%obj.sourceObject.client)) ^^{ ^^^%obj.sourceObject.client.centerPrint("<bitmap:add-ons/server_hitmarkers/hitmarker>", 1); ^^^%obj.sourceObject.client.play2D(hitMarkerSound); >>> Error report complete. ADD-ON "Server_Hitmarkers" CONTAINS SYNTAX ERRORS --- End quote --- |
| Pecon:
I should have seen that. Sorry. Fixed. |
| Navigation |
| Message Index |
| Next page |
| Previous page |