insidious
04-21-2003, 06:37 PM
How do i get FlagHUD and ItemHUD to be Transparent?
http://savage12.homestead.com/files/stripped2.png
http://savage12.homestead.com/files/stripped2.png
[T1 Stripped Help] Trans Flag/ItemHUDinsidious 04-21-2003, 06:37 PM How do i get FlagHUD and ItemHUD to be Transparent? http://savage12.homestead.com/files/stripped2.png Xeri0us 04-21-2003, 06:49 PM http://www.tee-d.com/stripped/scripts/TransMenuSystem.zip insidious 04-21-2003, 07:10 PM That doesnt make the flag/ItemHUD transparent, only the vchatmenu and other stripped menus shit. Ambient7 04-21-2003, 07:14 PM That doesnt make the flag/ItemHUD transparent, only the vchatmenu and other stripped menus shit. Hi, my smurf, you should know how to do this; you know how to script. After all, you're my smurf. insidious 04-21-2003, 07:15 PM I am clueless about scripting. :[ Ambient7 04-21-2003, 07:18 PM Save this as FlaggerDrop.cs: //Flagger Drop - revamped and simplified. //I added the traditional hud background - its just as fast (hell, faster) but it's easier to read now. Event::Attach(eventFlag, DropTimer::Flag); Event::Attach(EventFlagTi merUpdate, DropTimer::TimerUpdate); Event::Attach(eventExit, DropTimer::Remove); Event::Attach(eventPlayGu iCreated, DropTimer::Checkgui); function DropTimer::TimerUpdate(%t eam, %time) { if(%time == 5 && %team != $MyTeam) { say(1, $DropTImer::MessageEnemy) ; } else if (%time == 5 && %team == $MyTeam) { say(1, $DropTImer::MessageFriend ly); } } function DropTimer::Flag() { if($MyTeam == "1") { %enemy = 0; } else { %enemy = 1; } if($Flag::Status[$MyTeam] == "Home") { %frcolor = "<F1>"; } else { %frcolor = "<F2>"; } if($Flag::Status[%enemy] == "Home") { %encolor = "<F1>"; } else { %encolor = "<F2>"; } Control::SetValue("DT::FLAG", "<JL><B1,1:friendlyflag.bmp><L4>"@%frcolor@$Flag::Status[$MyTeam]@"\n<B-19,4:enemyflag.bmp><L4>"@%encolor@$Flag::Status[%enemy]); } function DropTimer::CheckGui(%gui) { $DT::HUD = newObject("DropTimerHUD", SimGui::Control, 0, Stripped::GetScreenSizeY( )-30, 150, 30); $DT::Text = newobject("DT::FLAG", FearGuiFormattedText, 4, 0, 0, 0); AddtoSet("DropTimerHUD", "DT::FLAG"); AddtoSet(playGui, "DropTimerHUD"); Control::setPosition("DropTimerHUD", $DTPref::XOffset, 0, Stripped::GetScreenSizeY( )-30); DropTimer::Flag(); } function DropTimer::Remove() { removeFromSet("playgui", $DT::HUD); deleteObject($DT::HUD); } insidious 04-21-2003, 07:22 PM Thanks man, now the ItemHUD? :) Ambient7 04-21-2003, 07:45 PM Back up your current ItemHUD.cs file first (and hopefully, the bitmaps are also in an ItemHUD folder in your Config folder, right?), in case this doesn't work. //========================= ========================= ======== // File: ItemHUD.cs // Version: 2.0 // Author: Ernie ;) / daerid :) // Credits: Runar, Presto, Crunchy, Mr.Poop // Info: This HUD is practically Crunchy's ItemHUD // that i just modified to work without Presto. // // daerid: And I just modified it to work with stripped // Packaged with Boots Primo ItemHUD replacement Icons. //========================= ========================= ======== // How often, in seconds, is the HUD to update itself? $ItemHUD::updatetime = 1.5; // This is how far, in pixels, from the top of the screen you want the hud to appear. // (The hud is on the Far Left) $ItemHUD::ypos = 500; Event::Attach(eventPlayGu iCreated, ItemHUD::Create); Event::Attach(eventExit, ItemHUD::Destroy); Event::Attach(eventConnec ted, ItemHUD::Update); // Create HUD, if exists Update function ItemHUD::Create(%gui) { if($ItemHUD::Exists) { echo("ItemHUD::Exists!"); ItemHUD::Update(); return; } // Make sure we don't double it! $ItemHUD::Exists ="TRUE"; // Here's the main container $ItemHUD::hudContainer=ne wObject(ItemHUD_Container , SimGui::Control, 0, $ItemHUD::Ypos, 38, 54); // Here's the itemicons $ItemHUD::ItemsTextObj = newObject(ItemHUD_Text,Fe arGuiFormattedText,3,-2,32,58); // Add our controls to the container addToSet(ItemHUD_Containe r, $ItemHUD::ItemsTextObj); // Add the whole container to PlayGui addToSet(PlayGui, $ItemHUD::hudContainer); // Update the HUD to set values ItemHUD::Update(); } function ItemHUD::Update() { // Only update if the Hud exists. We don't want a ton of error // messages if it doesn't. if($ItemHUD::exists) { %minetext = "<B0,4:ItemHUD\\MineIcon_on .bmp><f2><L4>"@getItemCount("Mine")@"\n"; %grentext = " <B-20,4:ItemHUD\\GrenIcon_on .bmp><f2><L4>"@getItemCount("Grenade")@"\n"; %beactext = " <B-20,4:ItemHUD\\BeacIcon_on .bmp><f2><L4>"@getItemCount("Beacon")@"\n"; %rkittext = " <B-20,4:ItemHUD\\RkitIcon_on .bmp><f2><L4>"@getItemCount("Repair Kit"); %text = %minetext @ %grentext @ %beactext @ %rkittext; Control::SetValue(ItemHUD _Text,%text); // Return in $ItemHUD::updatetime seconds! schedule("ItemHUD::Update();", $ItemHUD::updatetime); } } function ItemHUD::Destroy() { if($ItemHUD::exists) { removeFromSet(PlayGui, $ItemHUD::hudContainer); deleteObject($ItemHUD::hu dContainer); $ItemHUD::Exists = ""; } } insidious 04-21-2003, 07:59 PM ItemHUD didnt show up at all with the above code. :( Ambient7 04-21-2003, 08:10 PM There's this line: $ItemHUD::hudContainer=ne wObject(ItemHUD_Containe r, SimGui::Control, 0, $ItemHUD::Ypos, 38, 54); Remove the two spaces between the ItemHUD_Containe r." insidious 04-21-2003, 08:32 PM Lets fuck. :dapimp: Ambient7 04-21-2003, 08:37 PM Lets fuck. :dapimp: I can't screw myself, you know. :( After all, you ARE my smurf. | ||