Game Development Community

quick and nasty bloody screen

by deepscratch · in Torque Game Engine Advanced · 02/05/2009 (9:43 am) · 1 replies

what it looks like:
http://www.youtube.com/watch?v=tpVOtb_Ml5s

image download: http://www.mediafire.com/?sharekey=2c72c77bd46dc880aaca48175a79d1c38feedc09019f796f5be6ba49b5870170

here for your peruse is a quick and nasty bloody screen flash I put together in a few minutes. requires no source change, just add these lines:

function ClientCmdshowBlood(){
BloodyScreenGui.Visible = 0;
}

to player.cs,
then in :onDamage, under "%client = %obj.client;", add

BloodyScreenGui.Visible = 1;
schedule(1000,0,ClientCmdshowBlood,%obj.client,'setTime',0.5);

then in :onDisabled, after "%obj.setImageTrigger(0,false);", add this

BloodyScreenGui.Visible = 1;
schedule(10000,0,ClientCmdshowBlood,%obj.client,'setTime',0.5);

now, in PlayGui.gui, add this

new GuiControl(BloodyScreenGui) {
profile = "GuiDefaultProfile";
horizSizing = "center";
vertSizing = "center";
position = "0 0";
extent = "1024 768";
minExtent = "8 8";
visible = "0";

new GuiBitmapCtrl() {
profile = "GuiDefaultProfile";
horizSizing = "relative";
vertSizing = "relative";
position = "0 0";
extent = "1024 768";
minExtent = "8 8";
visible = "1";
bitmap = "./bloodyscreen";
wrap = "0";
helpTag = "0";
};
};

and finaly in the "game\scriptsAndAssets\client\ui" folder put the png file supplied, play game and have bloody screen splats.

I'm gonna try now to get an animated image or a shader to do the same, better job, but its a start, for those interested. any improvements you can supply would be nice, just post them here.
enjoy

#1
08/12/2009 (2:23 pm)
Nice idea!

I'm looking to implement something like this... something along the lines of Gears of War, where the amount of blood increases as your health is depleted.

Have you made any improvements to this since you first posted it ??