ZFGC

Resources => Coding => Topic started by: skullkid rules on April 14, 2008, 10:06:05 pm

Title: request-zelda mc chest opening gm7
Post by: skullkid rules on April 14, 2008, 10:06:05 pm
anybody able to help me? :huh:
Title: Re: request-zelda mc chest opening gm7
Post by: skullkid rules on April 17, 2008, 12:29:49 am
come on no body i really need the help i cant figure it out i allways fail...
Title: Re: request-zelda mc chest opening gm7
Post by: Rukiri on April 18, 2008, 10:18:47 pm
OMFG!!

ok in the chest object, make a collision with the hero object.

Create Event:
open_chest = false;
ani_speed = "you set this";
Collision Event:

if dir == "u" { if keyboard_check(vk_enter) { open_chest = true; }};

Step Event:
image_speed = ani_speed;
if image_index >= 5 { dialog("You've recieved some Crap"); }

image_index = "last image";

Note: the dialog is not a function it'd be a script, you would have to have your own dialog script inorder for that to work.

Ok hope that helps.
Title: Re: request-zelda mc chest opening gm7
Post by: Xiphirx on April 18, 2008, 10:47:45 pm
Ok to correct and make the code better,

Create Event:
open_chest = false;
ani_speed = "you set this";
itemtr = "bow";
image_single = 0
doanim = false

Collision Event:
if dir == "u" { if keyboard_check(vk_enter) { open_chest = true; doanim=true; }};

Step Event:
if doanim = true {
image_speed = ani_speed;
}
if image_index >= 5 { dialog("You've recieved some Crap");
image_index = "last image";
}

Have fun! :)
Title: Re: request-zelda mc chest opening gm7
Post by: skullkid rules on April 19, 2008, 01:49:46 am
thanks xiphirx that makes more sence but ok i used crispys engines item scripts so there really isnt an obj_bow or somethin can u help me with that plz?
Title: Re: request-zelda mc chest opening gm7
Post by: Xiphirx on April 19, 2008, 08:34:51 pm
no no no, that is a variable as soon as the chest is open something like global.herohasbow = true is activated and he can now use the bow. No obj's required
Title: Re: request-zelda mc chest opening gm7
Post by: skullkid rules on April 20, 2008, 12:32:15 am
no no no, that is a variable as soon as the chest is open something like global.herohasbow = true is activated and he can now use the bow. No obj's required
oooooooo that makes sence ill try it right now

EDIT:

im a noob at invetory sytyms so i need yr help again heres the code

if (objmenu.inventory[global.weapon]=1 && !usingsword && !usingbow & !usingboomerang && !instance_exists(holding_pot))
 switch global.weapon
 {
  case 0:
   scr_bow();
  break;
  case 1:
   scr_boomerang();
  break;
  case 3:
   scr_bombs();
  break;
  case 6:
   scr_lamp();
  break;
  case 7:
   scr_firerod();

}
  break;

Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved