Official Soldat Forums
Server Talk => Scripting Releases => Topic started by: Mr on December 24, 2007, 10:19:05 am
-
Script Name: UT Blood
Script Description: If you get hurt, the screen turns (transparent) red. On respawn it turns white.
Original Author(s): Example by Avkon, script by Mr
Core Version: 2.6.3
// let the screen turn red but transpartent on damage for 0.3 seconds
function OnPlayerDamage(Victim, Shooter: byte; Damage: integer): integer;
begin
// Victim = Player Damaged // Shooter = Player doing the damage
DrawText(Victim,'||',30,RGB(255,0,0),40,-2500,-500);
result := Damage;
end;
// let the screen turn white on respawn for 0.5 seconds
procedure OnPlayerRespawn(ID: Byte);
begin
DrawText(ID,'||',50,RGB(255,255,255),40,-2500,-500);
end;
Whole code in the zip attachment!
Hi all,
I saw Avkon's example and thought: Why don't make a script for Soldat, that let it look like UT?
So i scripted a bit and here it is ;D
I wish you a lot of fun with this script ... and i wish you a merry Christmas *g*
Installing this script is not hard:
Download the zip attachment, copy it in the script folder and start (or recompile) the server.
18.05.08 -> New Version
- Player can switch the blood and respawn effect on and off
- Compatible to other scripts, so if the player gets one-hit-killed, no, if over 4 players get on-hit-killed (by a script?!), the server won't crash anymore (Yes, I'm setting up an R/S server, and on cap, all die [pigtail] )
- R/S compatible
Command:
/blood [on|off] - Turns the blood effect on or off (every player can do this for himself)
The standard value is on, if you want to change it to off, just set Players[ID].ENABLED := true; to false.
procedure OnJoinGame(ID, Team: byte);
Begin
Players[ID].ENABLED := true;
Players[ID].FIRSTSPAWN := false;
end;
And now, have fun! Code in the zip attachment.
-
what about when you pick up the medikit
-
hmm yes good idea, i will work on this tomorrow, first i check yout my pressents :D
so, tomorrow or this evening i will work on it.
but, wich color i should take for this?
mb a green-white mix?
whatever - you can customize it so or so
-
good, good :P
-
hmm i got a problem:
there is no event like: OnBonusPickup ....
how to run sth if a healt pack (bonus 1) is picked up?
i just know how to give the bonus 1 (healt pack) ... and http://enesce.com/help/ don't has a answer for me, too.
so i ask it now here.
-
you could possibly use getplayerstat for that (if XY > ### and < ### then ***) or wutever
ask the guy that made Berserker mod (forgot who, just search 'Berserker Mod')
-
hmm, this is a good idea, but .... in getplayerstat is nothing to check the activ bonus.
and i dont know how to work with XY ... i think these are just positions of the player, or am i wrong?
-
u are right, there is no way to check this.
the way beserker mode works (it kills u if u touch a beserker) is by forcing 50% health in the beginning of the map, and checking in apponidle if your health went up. if it did, u took a bonus.
-
so just check if the health went up...
-
it wouldnt be instant. it cal take up to 0.9 second to show the flash, which might be kinda weird. but ye, u could try it.
-
k, i will work this evening on it.
but isnt it hard for the cpu to check always on idle the healt of all players? wouldnt this cause lags?
-
yes, that is quite cpu-intensive. just try and see if theres too much lag.
-
hmm i got a problem:
there is no event like: OnBonusPickup ....
how to run sth if a healt pack (bonus 1) is picked up?
i just know how to give the bonus 1 (healt pack) ... and http://enesce.com/help/ don't has a answer for me, too.
so i ask it now here.
use givebonus and make a new variable that's true when givebonus is there.
-
he wants it to be triggered when someone picks up a medkit..
-
hehe usefull script :D:D
-
This is amazing... Can't believe no one ever thought of it!
-
But what about OnPlayerDamage , does it works when you get healthkit?
-
hmm .... no
-
heh, but that script bugged a bit... not all people see red/white screen...just for them || shows in another place, can you explain why?.. cuz i am working on my Hippa mod, and wanna make BLIND effect... well, for me it works well, but other people dont see it...
-
I'm using the script on my server .... and it works without problems. only the old PCs are lagging a bit :-P
i tried all resultions .... it's working fine.
mb the graphic drivers are too old? just update them and try it again ;)
-
well, you dont understand... sorry for bad english... for me it works well, but for other players - no... very strange..
-
heh, but that script bugged a bit... not all people see red/white screen...just for them || shows in another place, can you explain why?.. cuz i am working on my Hippa mod, and wanna make BLIND effect... well, for me it works well, but other people dont see it...
This script is only working with BankGothic Lt BT font.
For example, English language file is using BankGothic Lt BT font but Turkish language is using Verdana.
This is the reason why some of the other players can't see it.
-
Well, i see, but not only, any changes of font.ini can cause that problem... how do you think, is it real to fix it? maybe bigger symbol with normal coordinates? =)
-
It won't work for people whose font includes those characters, or whose include a different unknown character symbol.
-
heh, but that script bugged a bit... not all people see red/white screen...just for them || shows in another place, can you explain why?.. cuz i am working on my Hippa mod, and wanna make BLIND effect... well, for me it works well, but other people dont see it...
People (like me) who modded their soldat so it has a different font may not see it properly.
-
* UPDATE *
Now R/S compatible and other fixes, have fun!
-
rocks :D gj