| | ... draw probleme ... | |
| | Auteur | Message |
---|
issmano Habitué
Messages : 83
| Sujet: ... draw probleme ... Mer 21 Nov 2012 - 19:48 | |
| salut , je suis revenu pour le dernier probleme ... quand j'etais presque de fini mon jeux j'ai trouve ce probleme ... le draw voila j'ai mis le point final , j'ai cree *draw event* et j'ai mis ce code : draw_sprite(sprite_index, 0, x, y);
bullets = ws_get_bullets(); if (bullets < 0) { bullets = '-'; } text = ws_get_name() + ' ' + string(ws_get_bullets_loaded()) + ' / ' + string(bullets); draw_text(room_width - 5 - string_width(text), room_height - 25, text); draw_circle(mouse_x, mouse_y, ws_get_accuracy(), 1);
if (ws_get_jammed()) { draw_set_color(c_red); draw_text(5, room_height - 40, 'Weapon Jammed! Reload to Unjam.'); } draw_set_color(c_black); draw_rectangle(3, room_height - 17, 107, room_height - 4, 0); if (ws_get_overheated()) { draw_set_color(c_red); } else { draw_set_color(c_green); } draw_rectangle(5, room_height - 15, 5 + ws_get_heat(), room_height - 5, 0); draw_set_color(c_black);
mais quand je cree le *draw event* le sprite heros serait invisible bizzar ? quand meme quand je ecrit : draw_sprite(sprite_index, 0, x, y); il me dessine le heros mais l'animation marche plus ? pourquoi ? et comment dois je fais le *draw event* avec une animation? si vous avez des questions demandez , je suis nul sur gmk et je comprend rien :/ alros ne pensez pas que je me moque de vous ! Merci d'avance ... _________________ Chicken-coq jeu a 5 choses = Ange-aideur//Course-d'oeuf//Biohazard-zombie(cache mode)//Biohazard-zombie(arme mode)// Counter-chicken Ange-aideur = 100% Accompli Course-d'oeuf = 100% Accompli Biohazard-zombie(cc) = 100% Accompli Biohazard-zombi(am) = 100% Accompli Counter-chicken = 100% Accompli JEU ACCOMPLI = 95% COOL
|
| | | Térence Utilisateur confirmé: Rang *****
Messages : 2213 Localisation : Oui
| Sujet: Re: ... draw probleme ... Mer 21 Nov 2012 - 20:52 | |
| draw_self() Si c'est pas ca faut nous donner toutes les fonctions que t'utilise parce que ton code fait que d'en appeller...; |
| | | issmano Habitué
Messages : 83
| Sujet: Re: ... draw probleme ... Mer 21 Nov 2012 - 22:32 | |
| Information about object: Commondo
Sprite: Commando_R Solid: false Visible: true Depth: 0 Persistent: false Parent: <no parent> Mask: <same as sprite>
Create Event: set variable move_speed to 4.55 set variable first_jump_height to -8..7 set variable second_jump_height to -8 set variable can_double to true set variable global.oeuf to false set variable image_single to 0 execute code:
// The initialization variables of the Weapon System ws_init(); // Now we're adding a weapon. We should always have at least 1 weapon // Check the comments inside ws_add_weapon and ws_add_weapon_extras to understand what are all arguments for ws_add_weapon('Magnum', 6, 12, 5, 10, 10, 10, room_speed * 1.5, 2, 6, room_speed * 0.8, 1, -1, 20, sprBulletMask, "draw_sprite(sprBulletMask, 0, x, y);"); ws_add_weapon_extras(0, 3, 0, 30, 0, 1, 0, sndMagnum, sndReload, -1, 0); ws_add_weapon('Shotgun', 4, 8, 5, 10, 30, 30, room_speed * 1, 0, 4, room_speed * 0.8, 7, 24, 20, sprBulletMask, "draw_sprite(sprBulletMask, 0, x, y);"); ws_add_weapon_extras(0, 3, 0, 30, 0, 1, 0, sndShotgun, sndReload, -1, 300); ws_add_weapon('Uzi', 25, 25, 5, 10, 10, 5, room_speed * 2, 1, 25, room_speed * 0.15, 1, 75, 20, sprBulletMask, "draw_sprite(sprBulletMask, 0, x, y);"); ws_add_weapon_extras(0, 3, 3, 5, 0, 1, 0, sndUzi, sndReload, -1); ws_add_weapon('Carabine', 4, 6, 5, 10, 20, 10, room_speed * 1.3, 1, 4, room_speed * 1, 3, 24, 20, sprBulletMask, "draw_sprite(sprBulletMask, 0, x, y);"); ws_add_weapon_extras(0, 3, 0, 12, room_speed * 0.1, 1, 0, sndUzi, sndReload, -1, 0);
ws_check_feed(); // WARNING !!! // You MUST add all weapons at this stage. To not allow the user to have the last weapon at game start just add the weapon with 0 bullets (as well as 0 loaded bullets)
Alarm Event for alarm 9: COMMENT: Used for cooldown between shots
Alarm Event for alarm 10: COMMENT: Used for reloading interval execute code:
ws_reload();
Alarm Event for alarm 11: COMMENT: Used for bullet interval within 1 shot execute code:
ws_shoot_interval();
Step Event: if relative position (0,1) is collision free for Only solid objects if at relative position (0,0) there is object EAU set the gravity to 0.04 in direction 270 if vspeed is larger than 1.5 set the vertical speed to 0.4 else set the gravity to 0.92 in direction 270 else set the gravity to 0 in direction 270 execute code:
if !keyboard_check(vk_right) && !keyboard_check(vk_left) image_speed=0 else image_speed=1
execute code:
ws_step_code();
else if at relative position (0,0) there is object Ladder set the gravity to 0 in direction 270 set the vertical speed to 0
Collision Event with object Planche: move in direction direction at most 12 till a contact with solid objects set the vertical speed to 0 if relative position (0,1) gives a collision with Only solid objects set variable can_double to true
Collision Event with object TRAMP: set variable can_double to true set the vertical speed to -18.4
Collision Event with object Ladder: set variable on_ladder to true set variable can_double to true set the vertical speed to 0
Collision Event with object NID: if global.oeuf is equal to true change the instance into object J N I, not performing events
Collision Event with object Teleporte1: jump to position (teleporte2.x,teleporte2.y)
Keyboard Event for <Left> Key: if relative position (-move_speed,0) is collision free for Only solid objects jump relative to position (-move_speed,0) set the sprite to Commando_L with subimage 1-12 and speed 0.70
Keyboard Event for <Up> Key: if at relative position (0,0) there is object Ladder if relative position (0,-4) is collision free for Only solid objects jump relative to position (0,-4)
Keyboard Event for <Right> Key: if relative position (move_speed,0) is collision free for Only solid objects jump relative to position (move_speed,0) set the sprite to Commando_R with subimage 1-12 and speed 0.70
Keyboard Event for <Down> Key: if at relative position (0,0) there is object Ladder if relative position (0,4) is collision free for Only solid objects jump relative to position (0,4)
Keyboard Event for <Delete> Key: set screen mode to: switch
Mouse Event for Glob Left Button: execute code:
ws_shoot();
Mouse Event for Mouse Wheel Up: execute code:
ws_weapon_switch_start(-3);
Mouse Event for Mouse Wheel Down: execute code:
ws_weapon_switch_start(-2);
Draw Event: execute code:
draw_sprite(sprite_index, 0, x, y);
bullets = ws_get_bullets(); if (bullets < 0) { bullets = '-'; } text = ws_get_name() + ' ' + string(ws_get_bullets_loaded()) + ' / ' + string(bullets); draw_text(room_width - 5 - string_width(text), room_height - 25, text); draw_circle(mouse_x, mouse_y, ws_get_accuracy(), 1);
if (ws_get_jammed()) { draw_set_color(c_red); draw_text(5, room_height - 40, 'Weapon Jammed! Reload to Unjam.'); } draw_set_color(c_black); draw_rectangle(3, room_height - 17, 107, room_height - 4, 0); if (ws_get_overheated()) { draw_set_color(c_red); } else { draw_set_color(c_green); } draw_rectangle(5, room_height - 15, 5 + ws_get_heat(), room_height - 5, 0); draw_set_color(c_black);
Key Press Event for <Up> Key: if relative position (0,1) gives a collision with Only solid objects set the vertical speed to first_jump_height else if can_double is equal to true set variable can_double to false set the vertical speed to second_jump_height if at relative position (0,0) there is object EAU set the vertical speed to -1.07
Key Press Event for 1-key Key: execute code:
ws_weapon_switch_start(0);
Key Press Event for 2-key Key: execute code:
ws_weapon_switch_start(1);
Key Press Event for 3-key Key: execute code:
ws_weapon_switch_start(2);
Key Press Event for 4-key Key: execute code:
ws_weapon_switch_start(3);
Key Press Event for E-key Key: execute code:
ws_weapon_switch_start(-1);
Key Press Event for R-key Key: execute code:
ws_reload_start();
Key Release Event for <Left> Key: set the sprite to Commando_L with subimage 0 and speed 1
Key Release Event for <Right> Key: set the sprite to Commando_R with subimage 0 and speed 1
_________________ Chicken-coq jeu a 5 choses = Ange-aideur//Course-d'oeuf//Biohazard-zombie(cache mode)//Biohazard-zombie(arme mode)// Counter-chicken Ange-aideur = 100% Accompli Course-d'oeuf = 100% Accompli Biohazard-zombie(cc) = 100% Accompli Biohazard-zombi(am) = 100% Accompli Counter-chicken = 100% Accompli JEU ACCOMPLI = 95% COOL
|
| | | Térence Utilisateur confirmé: Rang *****
Messages : 2213 Localisation : Oui
| Sujet: Re: ... draw probleme ... Jeu 22 Nov 2012 - 7:04 | |
| Je t'ai demandé le code des fonctions qui sont appelées dans ton code, pas ca... Et ca ca montre que t'utilise du D&D et des codes gml récupérés je sais pas ou dont tu n'es pas l'auteur... Alors essaie plutot de tout faire toi même et pas d'adapter les trucs des autres, sinon tu va te retrouver avec un gros bordel.... |
| | | Caly Utilisateur confirmé: Rang ****
Messages : 1285 Localisation : Haute Normandie Projet Actuel : Capturer, apprivoiser et dresser des Pokémons sauvages pour faire des spectacles de rue et en faire mon métier.
| Sujet: Re: ... draw probleme ... Jeu 22 Nov 2012 - 14:41 | |
| - Térence68 a écrit:
- gros bordel
|
| | | issmano Habitué
Messages : 83
| Sujet: Re: ... draw probleme ... Jeu 22 Nov 2012 - 15:13 | |
| oui le code c'est d'un exemple tres coool par contre je peux jamais faire ce code :/ ... car je ne sais deja pas d'ou avoir de l'aide il n y a plus rien et person dans mon pays qui peut me fait comprend tous alors je suis encore en basic je suis cree des jeux mais pas des profesionnelle , j'essaie de fonde mais sa reste toujours nul ... j'ai bien mon code d attaquer mais il est encore nul sa sert a rien a coter de ce exemple ... je sais pas si vous me comprenez ... deja moi j'ai fini mon jeux sauf dans ce petit probleme de draw ... ( en utilisant 1 exemple j'ai vraiment fait tout fait moi et vous qui m'a aider et j'ai restarer mon jeux pour que je le fini avec le exemple )
_________________ Chicken-coq jeu a 5 choses = Ange-aideur//Course-d'oeuf//Biohazard-zombie(cache mode)//Biohazard-zombie(arme mode)// Counter-chicken Ange-aideur = 100% Accompli Course-d'oeuf = 100% Accompli Biohazard-zombie(cc) = 100% Accompli Biohazard-zombi(am) = 100% Accompli Counter-chicken = 100% Accompli JEU ACCOMPLI = 95% COOL
|
| | | issmano Habitué
Messages : 83
| Sujet: Re: ... draw probleme ... Ven 23 Nov 2012 - 22:59 | |
| une aide svp? mon seul probleme :/ _________________ Chicken-coq jeu a 5 choses = Ange-aideur//Course-d'oeuf//Biohazard-zombie(cache mode)//Biohazard-zombie(arme mode)// Counter-chicken Ange-aideur = 100% Accompli Course-d'oeuf = 100% Accompli Biohazard-zombie(cc) = 100% Accompli Biohazard-zombi(am) = 100% Accompli Counter-chicken = 100% Accompli JEU ACCOMPLI = 95% COOL
|
| | | Térence Utilisateur confirmé: Rang *****
Messages : 2213 Localisation : Oui
| Sujet: Re: ... draw probleme ... Sam 24 Nov 2012 - 7:18 | |
| Bon c'est quoi le problème précisément ? Ton event draw s'execute pas ou c'est juste ton sprite ? |
| | | GDOR1 Très bonne participation
Messages : 130
| Sujet: Re: ... draw probleme ... Sam 24 Nov 2012 - 10:45 | |
| Issmano, à quoi servent les codes ws_get_bullets()?
Sinon, essaye ça : draw_sprite(sprite_index,-1,x,y), ça devrait te faire l'animation (désolé si je passe pour un idiot, mais son problème d'animation doit venir de là). |
| | | Térence Utilisateur confirmé: Rang *****
Messages : 2213 Localisation : Oui
| Sujet: Re: ... draw probleme ... Sam 24 Nov 2012 - 10:54 | |
| Je lui avait dit d'essayer draw_self(), ce qui revient au même que ton code, mais ca m'étonnerait pas qu'il ai même pas testé.... Donc issamano si t'as même pas essayé tu peux aller faire ***** ton monde ailleurs, compte plus sur moi pour t'aider. |
| | | GDOR1 Très bonne participation
Messages : 130
| Sujet: Re: ... draw probleme ... Sam 24 Nov 2012 - 10:57 | |
| C'est juste que draw_self() n'existe pas dans GM, donc ça lui ferait une erreur... |
| | | Térence Utilisateur confirmé: Rang *****
Messages : 2213 Localisation : Oui
| Sujet: Re: ... draw probleme ... Sam 24 Nov 2012 - 11:02 | |
| Elle est pas dans la doc de gm6 mais elle existe bel et bien, je l'utilise très souvent. |
| | | GDOR1 Très bonne participation
Messages : 130
| Sujet: Re: ... draw probleme ... Sam 24 Nov 2012 - 11:07 | |
| Ah bon? Désolé, je savais pas...
Par contre je ne crois pas qu'elle existe dans GM8, alors du coup, ça dépend de quel version il se sert...
|
| | | Térence Utilisateur confirmé: Rang *****
Messages : 2213 Localisation : Oui
| Sujet: Re: ... draw probleme ... Sam 24 Nov 2012 - 11:10 | |
| Bah moi j'ai gm8.1 et ca marche, mais ton code aussi au pire. C'est juste que si il change le scale, l'angle ou autre chose, ben iaura pas de problème avec draw_self contrairement à ta technique ; faudrait utiliser draw_sprite_ext avec toutes les variables de sprites mais bon.... |
| | | GDOR1 Très bonne participation
Messages : 130
| Sujet: Re: ... draw probleme ... Sam 24 Nov 2012 - 11:12 | |
| Ah désolé... Je savais pas qu'elle y était dans GM8.1 ... |
| | | Mass *Excellent utilisateur*
Messages : 3351 Localisation : Dans une canonnière wookie. Projet Actuel : Monter des trucs et des machins
| Sujet: Re: ... draw probleme ... Sam 24 Nov 2012 - 11:29 | |
| - Térence68 a écrit:
- Elle est pas dans la doc de gm6 mais elle existe bel et bien, je l'utilise très souvent.
Hmm ? Non elle n'y est pas. |
| | | Térence Utilisateur confirmé: Rang *****
Messages : 2213 Localisation : Oui
| Sujet: Re: ... draw probleme ... Sam 24 Nov 2012 - 11:31 | |
| - Mass a écrit:
- Térence68 a écrit:
- Elle est pas dans la doc de gm6 mais elle existe bel et bien, je l'utilise très souvent.
Hmm ? Non elle n'y est pas. Désolé j'ai pas capté... elle est pas où ? |
| | | Invité Invité
| Sujet: Re: ... draw probleme ... Sam 24 Nov 2012 - 11:41 | |
| |
| | | Térence Utilisateur confirmé: Rang *****
Messages : 2213 Localisation : Oui
| Sujet: Re: ... draw probleme ... Sam 24 Nov 2012 - 11:44 | |
| Lol c'est moi qui devient cinglé alors.... Essayez de mettre un piece of code dans l'event draw, l'objet ne s'affiche plus, et rajoutez draw_self(), tout marche à merveille ! |
| | | issmano Habitué
Messages : 83
| Sujet: Re: ... draw probleme ... Sam 24 Nov 2012 - 12:21 | |
| terence , GDOR1 a raison quand il a dit que j'ai tester et sa marche pas :/ je suis pas bete pour demander aide et ne pas essayer ... au fait probleme resole ! GDOR1 ... merci j'ai test sa et sa marche mon animation bouge cool j'ai fini mon jeuuuuuuuuuuuuuuuuu quand je la rend version en ligne je vais vous inviter au fait meme si le probleme etait simple je ne me moque pas de vous ... je suis debutant vous savez ... MERCII Au fait j'ai pas compris de ce que vous parlez en bas ^^ mais moi je suis gmk version8.0 pro (oui avant j'etait 8.1 pro mais j'ai perdu) _________________ Chicken-coq jeu a 5 choses = Ange-aideur//Course-d'oeuf//Biohazard-zombie(cache mode)//Biohazard-zombie(arme mode)// Counter-chicken Ange-aideur = 100% Accompli Course-d'oeuf = 100% Accompli Biohazard-zombie(cc) = 100% Accompli Biohazard-zombi(am) = 100% Accompli Counter-chicken = 100% Accompli JEU ACCOMPLI = 95% COOL
|
| | | Térence Utilisateur confirmé: Rang *****
Messages : 2213 Localisation : Oui
| Sujet: Re: ... draw probleme ... Sam 24 Nov 2012 - 12:48 | |
| Bref je viens de tester histoire d'être sur, et ca marche. La fonction est colorisé et le sprite est affiché ; par contre quand je cherche dans la doc anglaise 8.1, il me trouve la fonction, mais quand je clique, ils expliquent pas la fonction. Je suppose que c'est un oubli de leur part, mais elle existe bel et bien, en tous cas sur gm8.1 |
| | | issmano Habitué
Messages : 83
| Sujet: Re: ... draw probleme ... Sam 24 Nov 2012 - 22:11 | |
| finalement je dois ameliore le jeu a 8.1 pro pour avoir plus technique de version en ligne ... ah gb ws bullet get sa sert : au cas quand l'ammo est part terre et que tu le prend alors c'est le devoir de scipt ws bullet get ... si tu veux le exemple je peux te donne c'est le meilleur exemple smple pour met jeu de combat arme je te jure ^^ _________________ Chicken-coq jeu a 5 choses = Ange-aideur//Course-d'oeuf//Biohazard-zombie(cache mode)//Biohazard-zombie(arme mode)// Counter-chicken Ange-aideur = 100% Accompli Course-d'oeuf = 100% Accompli Biohazard-zombie(cc) = 100% Accompli Biohazard-zombi(am) = 100% Accompli Counter-chicken = 100% Accompli JEU ACCOMPLI = 95% COOL
|
| | | GDOR1 Très bonne participation
Messages : 130
| Sujet: Re: ... draw probleme ... Lun 26 Nov 2012 - 19:03 | |
| Non non ! C'est bon, c'était juste pour voir si le problème ne venait pas de là ! |
| | | issmano Habitué
Messages : 83
| Sujet: Re: ... draw probleme ... Mer 28 Nov 2012 - 10:57 | |
| ah ok ^^ _________________ Chicken-coq jeu a 5 choses = Ange-aideur//Course-d'oeuf//Biohazard-zombie(cache mode)//Biohazard-zombie(arme mode)// Counter-chicken Ange-aideur = 100% Accompli Course-d'oeuf = 100% Accompli Biohazard-zombie(cc) = 100% Accompli Biohazard-zombi(am) = 100% Accompli Counter-chicken = 100% Accompli JEU ACCOMPLI = 95% COOL
|
| | | Contenu sponsorisé
| Sujet: Re: ... draw probleme ... | |
| |
| | | | ... draw probleme ... | |
|
Sujets similaires | |
|
| Permission de ce forum: | Vous ne pouvez pas répondre aux sujets dans ce forum
| |
| |
| |