ZFGC
Resources => Coding => Topic started by: skullkid rules on April 14, 2008, 10:06:05 pm
-
anybody able to help me? :huh:
-
come on no body i really need the help i cant figure it out i allways fail...
-
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.
-
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! :)
-
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?
-
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
-
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;