|
|
Menü FRAGE
#80246
07/02/06 15:08
07/02/06 15:08
|
Joined: Apr 2005
Posts: 2,332 Germany, BaWü
aztec
OP

Expert
|
OP

Expert
Joined: Apr 2005
Posts: 2,332
Germany, BaWü
|
hallo Ich habe mal wieder eine Frage ich habe 2 scripts Script 1: Code:
var video_mode = 7; // 800x600 var video_depth = 16; // 16 bit mode
var player_dist; var got_gun1 = 0; var got_gun2 = 0; var bullet_speed; var plate_speed; var count = 0; //Zähle die Platten var ammo = 200; //////////////////////////////////////////////////////////////
font simple = "arial!", 3, 30;
//////////////////////////////////////////////////////////////
bmap crosshair_map = <cross.pcx>;
//////////////////////////////////////////////////////////////
sound gotgun_snd = <gotgun.wav>; sound shoot_snd = <shoot.wav>;
//////////////////////////////////////////////////////////////
panel crosshair_pan { bmap = crosshair_map; layer = 20; pos_x = 0; pos_y = 0; flags = transparent, overlay, refresh, d3d; }
panel show_count { pos_x = 20; pos_y = 20; digits = 20, 20, 2, simple, 1, count; flags = visible; layer = 21; }
panel show_ammo { pos_x = 80; pos_y = 20; digits = 20, 20, 3, simple, 1, ammo; flags = visible; layer = 21; }
//////////////////////////////////////////////////////////////
function game_init(); function get_pistol1(); function get_pistol2(); function move_bullet(); function remove_me(); function move_plate(); function destroy_plate(); function animate_right(); function animate_left();
//////////////////////////////////////////////////////////////
string johnwayne_wmb = <jwayne.wmb>; string bullet_mdl = <bullet.mdl>; string plate_mdl = <plate.mdl>;
//////////////////////////////////////////////////////////////
function main() { on_d = null; // disables the debug panel level_load (johnwayne_wmb); wait (2); game_init(); }
action john_moves { player = me; my.invisible = on; // don't let the camera see me while (1) { vec_set (camera.pos, my.pos); camera.tilt += 20 * mouse_force.y * time; my.pan += 4 * (key_a - key_d) * time - 20 * mouse_force.x * time; camera.pan = my.pan; player_dist.x = 10 * (key_w - key_s) * time; player_dist.y = 0; player_dist.z = 0; ent_move(player_dist, nullvector); wait (1); } }
function game_init() { crosshair_pan.pos_x = screen_size.x / 2 - 8; // the crosshair has 16x16 pixels crosshair_pan.pos_y = screen_size.y / 2 - 8; while (1) { if (mouse_left == 1) // fire { crosshair_pan.visible = on; if (got_gun1 == 1 && got_gun2 == 0) // got right_pistol { animate_right(); ammo -=1; while(ammo <= 0) { wait(1); } snd_play (shoot_snd, 70, -100); ent_create (bullet_mdl, player.pos, move_bullet); } if (got_gun1 == 0 && got_gun2 == 1) // got left_pistol { animate_left(); ammo -=1; while(ammo <= 0) { wait(1); } snd_play (shoot_snd, 70, 100); ent_create (bullet_mdl, player.pos, move_bullet); } if (got_gun1 == 1 && got_gun2 == 1) // got two guns { animate_right(); ammo -=1; while(ammo <= 0) { wait(1); } snd_play (shoot_snd, 70, -100); // right speaker ent_create (bullet_mdl, player.pos, move_bullet); waitt (3); animate_left(); ammo -=1; snd_play (shoot_snd, 70, 100); // left speaker ent_create (bullet_mdl, player.pos, move_bullet); } while (mouse_left == 1) {wait (1);} // disable autofire } wait (1); } }
entity right_pistol // will appear on screen { type = <eagled.mdl>; layer = 10; view = camera; x = 25; y = -10; z = -10; }
entity left_pistol // will appear on screen { type = <eagled.mdl>; layer = 10; view = camera; x = 25; y = 10; z = -10; }
action pistol1 // attached to the gun { my.enable_impact = me; my.event = get_pistol1; while (my != null) // the gun wasn't picked up yet { my.pan += 3 * time; wait (1); } }
function get_pistol1() { wait (1); got_gun1 = 1; snd_play (gotgun_snd, 80, 0); ent_remove (me); right_pistol.visible = on; }
action pistol2 // attached to the gun { my.enable_impact = me; my.event = get_pistol2; while (my != null) // the gun wasn't picked up yet { my.pan += 3 * time; wait (1); } }
function get_pistol2() { wait (1); got_gun2 = 1; snd_play (gotgun_snd, 80, 0); ent_remove (me); left_pistol.visible = on; }
function move_bullet() { wait (1); // my.invisible = on; // comment this line if you want to see the bullets my.enable_entity = on; my.enable_block = on; my.event = remove_me; my.passable = on; my.pan = camera.pan; my.tilt = camera.tilt;
my.skill1 = 0; bullet_speed.x = 200; bullet_speed.y = 0; bullet_speed.z = 0; bullet_speed *= time; while (my.skill1 < 50) { if (my == null) {return;} if (my.skill1 < 0.1) // don't collide with the player { my.passable = on; } else { my.passable = off; } my.skill1 += 0.1 * time; ent_move (bullet_speed, nullvector); wait (1); } remove me; }
function remove_me() { wait (2); ent_remove (me); }
action plate_generator { my.passable = on; while (1) { if (random(1) > 0.3) { ent_create (plate_mdl, my.pos, move_plate); } waitt (32); } }
function move_plate() { wait (1); my.enable_impact = on; my.enable_block = on; my.event = destroy_plate; my.skill12 = (1 - random(2)) / 5; // note the use of 3 skills instead of a separate var my.skill13 = (1 - random(2)) / 5; my.skill14 = 2 + random(1); plate_speed *= time; while (me != null) { my.roll += 1 * time; // uncomment this line to see some weird stuff ent_move (my.skill12, nullvector); my.skill14 -= 0.05 * time; wait (1); } }
function destroy_plate() { wait (1); if (event_type == event_impact) // hit by a bullet { my.transparent = on; my.alpha = 100; while (my.roll < 1440) // 4 rotations { my.roll += 10 * time; my.alpha -= 0.7 * time; wait (1); } count+=1; } ent_remove (me); // remove the plate (without tilting) if it hit the ground (event_block) }
function animate_right() { while (right_pistol.tilt < 5) { right_pistol.tilt += 5 * time; wait (1); } while (right_pistol.tilt > 0) { right_pistol.tilt -= 5 * time; wait (1); } right_pistol.tilt = 0; }
function animate_left() { while (left_pistol.tilt < 5) { left_pistol.tilt += 5 * time; wait (1); } while (left_pistol.tilt > 0) { left_pistol.tilt -= 5 * time; wait (1); } left_pistol.tilt = 0; }
function ammonition { ammo += 20; ent_remove(me); }
action munition { my.enable_impact = me; my.event = ammonition; while (my != null) // the gun wasn't picked up yet { my.pan += 3 * time; wait (1); } }
function ammonitionG { ammo += 50; ent_remove(me); }
action munitionG { my.enable_impact = me; my.event = ammonitionG; while (my != null) // the gun wasn't picked up yet { my.pan += 3 * time; wait (1); } } und Script2: (ist das Hauptmenü) Code:
// jwayneintro.wdl
include <jwayne.wdl>;
var video_depth = 32; var video_mode = 8;
string level = <jwayneintro.wmb>; string level2 = <jwayne.wmb>;
bmap menu = <revolver.pcx>; bmap but1 = <buttonst.pcx>; bmap but2 = <buttontut.pcx>; bmap but3 = <buttonexit.pcx>; bmap knarre = <pistol.pcx>;
function main { level_load(level); mouse_map = knarre; mouse_mode = 2; while(1) { mouse_pos.x = pointer.x; mouse_pos.y = pointer.y; wait(1); } }
function exit_game { wait(2); exit; }
panel main_menu { bmap = menu; pos_x = 0; pos_y = 0; flags = visible, refresh, d3d; button = 0, 0, but1, but1, but1, null, null, null; button = 0, 80, but2, but2, but2, tut_level, null, null; button = 0, 160, but3, but3, but3, exit_game, null, null; layer = 23; }
function tut_level { level_load(level2); } wenn Ich auf den button tut drücke lädt er zwar das Level aus script 1 aber all e pannels sind noch visible ich hab auch schon vewrsucht alle panels icnlusive mauszeiger auf visible off zu stellen hat auch funktiniert aber nur hat man Im Tut level nicht mehr das Fadenkreuz und kann auch nicht mehr schießen bitte helf mir  Mfg Star_Fox
Visit: schwenkschuster-design.de
|
|
|
Re: Menü FRAGE
[Re: Xarthor]
#80249
07/02/06 17:20
07/02/06 17:20
|
Joined: Apr 2005
Posts: 2,332 Germany, BaWü
aztec
OP

Expert
|
OP

Expert
Joined: Apr 2005
Posts: 2,332
Germany, BaWü
|
Ja die A5 Aber ganz legal kefaut EHRLICH gekauft (Die A6 kauf ich am Montag dann) 
Last edited by Star_Fox; 07/02/06 17:32.
Visit: schwenkschuster-design.de
|
|
|
Re: Menü FRAGE
[Re: aztec]
#80254
07/03/06 14:41
07/03/06 14:41
|
Joined: Aug 2003
Posts: 7,439 Red Dwarf
Michael_Schwarz
Senior Expert
|
Senior Expert
Joined: Aug 2003
Posts: 7,439
Red Dwarf
|
die A6 warez hat ein schlechtes image auf dich geworfen - ich glaube kaum das dir einer in näherer zeit helfen wird
"Sometimes JCL reminds me of Notch, but more competent" ~ Kiyaku
|
|
|
Re: Menü FRAGE
[Re: Michael_Schwarz]
#80255
07/03/06 15:46
07/03/06 15:46
|
Joined: Apr 2005
Posts: 2,332 Germany, BaWü
aztec
OP

Expert
|
OP

Expert
Joined: Apr 2005
Posts: 2,332
Germany, BaWü
|
Naja dann warte ich einfach bis meine A6 ankommt wollte sie heute kaufen aber die hotline war nicht erreichbar naja wenn ichs dann hab meldet sich vielleicht wieder einer Danke für die info Star_Fox 
Visit: schwenkschuster-design.de
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|