1 registered members (M_D),
1,430
guests, and 3
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Help with the pos_x and pos_y of the weapon pa
[Re: LWD]
#111672
02/11/07 18:17
02/11/07 18:17
|
Joined: Apr 2005
Posts: 3,076 Germany, NRW
rvL_eXile
3D Artist
|
3D Artist
Joined: Apr 2005
Posts: 3,076
Germany, NRW
|
Show your Code Please, Do you want to change X/Y Koordinates of the Digits or the Panel?
cYa Sebastian
Last edited by Angel; 02/11/07 19:30.
Tutorials: [Blender]Terrain creation ENG/GER [Blender]Low Poly Tree Modeling [GIMP]Create a Texture for Terrains CLICK HERE
|
|
|
Re: Help with the pos_x and pos_y of the weapon pa
[Re: rvL_eXile]
#111673
02/13/07 17:37
02/13/07 17:37
|
Joined: Jan 2006
Posts: 53
LWD
OP
Junior Member
|
OP
Junior Member
Joined: Jan 2006
Posts: 53
|
of the digits... Here is my code ´(i´m using the templates)
ifndef plBipedWeapHUD_wdl; define plBipedWeapHUD_wdl;
// --------------------------------------------------------------------- // STARTHEADER // // ver: 4.6 // date: 060518 // // title: Biped Player Weapon "HUD" (01) // class: PLAYER // type: USER // image: plBipedHUD01.pcx // help: Display a "Heads Up Display" for weapon state. // // needs: gid01.wdl // needs: plSelect.wdl, cameraTarget.wdl // needs: miscInput01.wdl, plBipedInput01.wdl // needs: bipedPhy01.wdl, // needs: bipedAnim01.wdl, bipedSnd01.wdl, plBiped01.wdl, // needs: trigger00.wdl, particle00.wdl, // needs: weaponfx00.wdl, weapons00.wdl, // needs: plBipedWeap00.wdl // // prefix: plBipedWeapHUD01_ // idcode: 028 // // ENDHEADER // ---------------------------------------------------------------------
// --------------------------------------------------------------------- // section: Ammo Panel
// entry: Ammo Panel Bitmap // id: 2 bmap plBipedWeapHUD01_ammo_bmp = <ammo_hud.tga>;
// entry: Position // help: -1-off, 0-free, 1-upper left, 2-upper right, 3-lower left, 4-lower right // cntl: spin -1 4 1 // id: 5 define plBipedWeapHUD01_ammo_pos = 4;
// entry: Current Ammo Panel Font // id: 1 font plBipedWeapHUD01_c_ammo_font = <font2_gray_dig.pcx>,12, 24; //font plBipedWeapHUD01_c_ammo_font = <font2_green_dig.pcx>,12, 24; // entry: Total Ammo Panel Font // id: 6 font plBipedWeapHUD01_t_ammo_font = <font1_blue.pcx>,12,16; //font plBipedWeapHUD01_t_ammo_font = <font1_green.pcx>,12,16;
panel plBipedWeapHUD01_Ammo_Pan { bmap = plBipedWeapHUD01_ammo_bmp; // entry: Ammo Panel X position // id: 3 pos_X = 636; //636 // entry: Ammo Panel Y position // id: 4 pos_y = 528; digits = 50,20,4,plBipedWeapHUD01_c_ammo_font,1,plBipedWeap00_curr_ammo; digits = 95,28,4,plBipedWeapHUD01_t_ammo_font,1,plBipedWeap00_res_ammo; flags = overlay,refresh,visible,transparent; layer = 2; }
starter PlBipedWeapHUD01_Ammo() { // used to store the old resolution var old_video_mode = 0;
// remove panel if(plBipedWeapHUD01_ammo_pos<0) { plBipedWeapHUD01_Ammo_Pan.visible = off; plBipedWeapHUD01_Ammo_Pan.refresh = off; return; }
// panel uses set position if((plBipedWeapHUD01_ammo_pos == 0) || (plBipedWeapHUD01_ammo_pos > 4)) { return; }
while(1) { if(old_video_mode != video_mode) {
if(plBipedWeapHUD01_ammo_pos < 2) { // 1-upper left plBipedWeapHUD01_Ammo_Pan.pos_x = 0; plBipedWeapHUD01_Ammo_Pan.pos_y = 2; // bug(?) requires a 2 pixel offset to show digits } else { if(plBipedWeapHUD01_ammo_pos < 3) { // 2-upper right, plBipedWeapHUD01_Ammo_Pan.pos_x = (screen_size.x - bmap_width(plBipedWeapHUD01_ammo_bmp)); plBipedWeapHUD01_Ammo_Pan.pos_y = 2; // bug(?) requires a 2 pixel offset to show digits
} else { if(plBipedWeapHUD01_ammo_pos < 4) { // 3-lower left plBipedWeapHUD01_Ammo_Pan.pos_x = 0; plBipedWeapHUD01_Ammo_Pan.pos_y = (screen_size.y - bmap_height(plBipedWeapHUD01_ammo_bmp));;
} else { // 4-lower right plBipedWeapHUD01_Ammo_Pan.pos_x = (screen_size.x - bmap_width(plBipedWeapHUD01_ammo_bmp)); plBipedWeapHUD01_Ammo_Pan.pos_y = (screen_size.y - bmap_height(plBipedWeapHUD01_ammo_bmp));; }
} } old_video_mode = video_mode; } wait(5); // no need to update every frame } }
endif;
Thanks!
Last edited by LWD; 02/13/07 17:39.
|
|
|
Re: Help with the pos_x and pos_y of the weapon pa
[Re: LWD]
#111674
02/13/07 18:09
02/13/07 18:09
|
Joined: Apr 2005
Posts: 3,076 Germany, NRW
rvL_eXile
3D Artist
|
3D Artist
Joined: Apr 2005
Posts: 3,076
Germany, NRW
|
Code:
digits = 50,20,4,plBipedWeapHUD01_c_ammo_font,1,plBipedWeap00_curr_ammo; digits = 95,28,4,plBipedWeapHUD01_t_ammo_font,1,plBipedWeap00_res_ammo;
Change the Red Marked Numbers, the first Number is X and the second one ist Y Hope this helps u cYa Sebastian
Tutorials: [Blender]Terrain creation ENG/GER [Blender]Low Poly Tree Modeling [GIMP]Create a Texture for Terrains CLICK HERE
|
|
|
Re: Help with the pos_x and pos_y of the weapon pa
[Re: rvL_eXile]
#111675
02/13/07 18:14
02/13/07 18:14
|
Joined: Jan 2006
Posts: 53
LWD
OP
Junior Member
|
OP
Junior Member
Joined: Jan 2006
Posts: 53
|
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|