Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About K31V

  • Rank
  • Birthday 03/30/1991

Profile Information

  • Location
  • Interests
  1. What suppose to happen is: When "thunder" collides with "pokeball," "pokeball suppose to be remove from the canvas The sprites "thunder" and "pokeball" are not colliding. if (this.intersect(pokeball)) { pokeball.image = game.assets['explosion.png']; game.currentScene.removeChild(this); There's no error on the console between the 2 sprites.
  2. It's a long shot but I'm giving this a shot. I'm dealing with enchant.js and I get the grasp of it but not entirely. My biggest problem is having my function shootingPokeball and function makePokeball in SCENE 2 to collide with one anothe I'm programming through a website: 9leap.net // --- Guide --- // Stage 1: // Avoid the POKEBALLS to remain alive for 15 seconds. Grab as many RARE CANDY for points (20). // Stage 2: // Shoot down as many POKEBALLS to collect points (10 each). window.onload = myGame; enchant(); // GAME function myGame() { var game = new
  3. K31V

    Help a newbie out

    The program is a 50/50 chance game of winning or losing. The player must reach 100 HP in the 50/50 game in order to win. If the player reaches 100 HP, I want add a message saying ("Congratulations, you have won!") and the game finishes. I already got down the code where if you lose it'll say ("you have fought your last battle and you've lost.."). The other thing is where do I input a message saying ("You must win the next battle if you want to survive.") when the player's HP is equal or less than 10 HP before hitting 0 HP within the code.
  4. K31V

    Help a newbie out

    Hopefully this will help clarify things up: <!DOCTYPE> <html> <head> <title>Requisite Warrior </title> </head> <body> <h1>Requisite Warrior </h1> <script> // Define entities. /* requisiteWarrior starts out with a health of 20. * When she does battle, there is a 50/50 chance that she will emerge * victorious. Victory ramps up her health by 8, defeat down by 10. * The requisiteWarrior dies when her health drops below 0. */ var requisiteWarrior = { health: 20, /* doBattle makes requisiteWarrior do battle. I
  5. K31V

    Help a newbie out

    It's a 50/50 game. You start with 20 HP and you lose 10 HP when you lose and gain 8 HP when you win. I want the window.alert(); to show up to warn the player when the character's HP is equal or less than 10 HP, and that's where I'm stuck at.
  6. K31V

    Help a newbie out

    So how do I make it so almostDead can run with the window.alert(); if the player's health is less than 10? And where should I put it to make it functional? almostDead: function () { if (this.health >= 10) { window.alert(Your health is low!);}
  7. How do I add a window.alert popup where if the warrior’s health drops dangerously low, the user is told she must win the next battle to stay alive. I tried inputting function and window.alert(); every where but the program doesn't work. What must I do to make it work? If you can, can you give me some tips how to improve my skills. I would greatly appreciate it. Thanks! --------------------------------------------------------------------------------------------- <!DOCTYPE> <html> <head> <title>Requisite Warrior</title> </head> <body>
  • Create New...