A Flash Developer Resource Site

Results 1 to 18 of 18

Thread: DBZ Remake

  1. #1
    Tractor Veteran
    Join Date
    Jul 2003
    Posts
    184

    DBZ Remake

    I need help with this script

    Code:
    onClipEvent(enterFrame){
    	if(energy >= 0){
    	   this.gotoAndStop("Duck")
    	   energy += .1
    	}
    	else if(energy <= 5){
    	if(Key.isDown(key.Right)){
    		this.gotoAndStop("Walk")
    		this._x += 3
    		}
    	else if(Key.isDown(key.Left)){
    		this.gotoAndStop("Walk")
    		this._x -= 3
    		}
    	else if(Key.isDown(key.Down)){
    		this.gotoAndStop("Duck")
    		}
    	else if(Key.isDown(66)){
    		this.gotoAndStop("Kick")
    		_root.energy -= 5
    		}
    	else if(Key.isDown(67)){
    		this.gotoAndStop("Punch")
    		_root.energy -= 5
    		}
    	else if(Key.isDown(86)){
    		this.gotoAndStop("Charge")
    		_root.energy += 5
    		}
    	else{
    		this.gotoAndStop("Stand")
    	}
    	}
    }
    Explain? Ok

    When you press teh C key, you punch, when you press B you kick, when you press V you charge and raise your energy.

    When your energy is low (I want the minimum to be 0 if anyone knows how) your character will kneel down and slowly regain his energy.

    Once your energy is above 5, gameplay returns to normal.

    I would like so that it plays the kick animation once when you tap B, rather than holding it, same for the punch, but I want tp have to hold it to charge.

    Also, does anyone know how to make power bars?

    Um , I think thats it, I'll try to intigrate the jumping stuff I learned and maybe put an enemy in ^_^
    Last edited by brad_sk88; 08-11-2008 at 10:35 PM.

  2. #2
    When you know are. Son of Bryce's Avatar
    Join Date
    Aug 2002
    Location
    Los Angeles
    Posts
    838
    What happened to your "Harvest Moon Online"?

  3. #3
    Tractor Veteran
    Join Date
    Jul 2003
    Posts
    184
    that's off topic, but it's still there, I'm just having trouble making it work.

    Anyone else?

  4. #4
    Neoteric Lukstr's Avatar
    Join Date
    Apr 2002
    Location
    "The Cave"
    Posts
    695
    take some tutorials, starting with the space scrolling shooter in the tutorials section right here on Flash Kit. Please, PLEASE don't turn into the next rpgprogrammer.. please.
    - Lukstr

  5. #5
    for the win Asclepeos's Avatar
    Join Date
    Dec 2000
    Posts
    388
    Originally posted by brad_sk88
    that's off topic, but it's still there, I'm just having trouble making it work.

    Anyone else?
    If it's going to look nice the code will have to be a lot more .. well advanced.

  6. #6
    Tractor Veteran
    Join Date
    Jul 2003
    Posts
    184
    um, can I ask who rpgprogrammer is? I havn't been here long.

  7. #7
    Tractor Veteran
    Join Date
    Jul 2003
    Posts
    184
    k, I've looked thru the tutorials by david doull, but they don't seem to be what I need. I can't find a tutorial named space shooter anywhere :S

  8. #8
    Tractor Veteran
    Join Date
    Jul 2003
    Posts
    184
    bump, everyone ignores the bottom post

  9. #9
    for the win Asclepeos's Avatar
    Join Date
    Dec 2000
    Posts
    388
    I concur with lukstr, take one step at a time young padwan.

  10. #10
    Tractor Veteran
    Join Date
    Jul 2003
    Posts
    184
    Well, HMO is my main project, I'm doing mini games on the side to get familiarised with flash and then I can intigrate my new skills into HMO.

  11. #11
    FK's official coffee addict gasbag15's Avatar
    Join Date
    Aug 2001
    Location
    Melbourne
    Posts
    1,867
    Code:
    onClipEvent(enterFrame){
    	if(energy <= 0){
    	   this.gotoAndStop("Duck")
    	   energy += .1
    	}
    	else if(energy <= 5){
    	if(Key.isDown(key.Right)){
    		this.gotoAndStop("Walk")
    		this._x += 6
    		}
    	else if(Key.isDown(key.Left)){
    		this.gotoAndStop("Walk")
    		this._x -= 6
    		}
    	else if(Key.isDown(key.Down)){
    		this.gotoAndStop("Duck")
    		}
    	else if(Key.isDown(66)){
    		this.gotoAndStop("Kick")
    		_root.energy -= 5
    		}
    	else if(Key.isDown(67)){
    		this.gotoAndStop("Punch")
    		_root.energy -= 5
    		}
    	else if(Key.isDown(86)){
    		this.gotoAndStop("Charge")
    		_root.energy += 2
    		if(_root.energy > 50){
    			tellTarget(this){
    				_root.energy = 50;
    	gotoAndStop(1);
    }
    		}
    		}
    	else{
    		this.gotoAndStop("Stand")
    	}
    	}
    }
    I'll try fix the other things later; got the flu so I get frustrated from too much work or thinking in general

  12. #12
    Tractor Veteran
    Join Date
    Jul 2003
    Posts
    184
    bump, headache gone? this didtn seem to fix it.

  13. #13
    FK's official coffee addict gasbag15's Avatar
    Join Date
    Aug 2001
    Location
    Melbourne
    Posts
    1,867
    That code just prevents them from getting unlimited energy, so max = 50.

  14. #14
    Jordan Berry
    Join Date
    Oct 2002
    Posts
    307
    Heres a smart!

    I just took out the whole ducking and change thing becouse it was pointless. Once you got below 50 it just added 5 and went back up to 50 or above so it didnt even show any animation.. I could fix that but then the player would never die so i just made this...
    Attached Files Attached Files
    I'm back.

  15. #15
    Tractor Veteran
    Join Date
    Jul 2003
    Posts
    184
    Woah this topic was like 8 pages back, maybe more, and I just now posted an update to the new DBZ fighter thread posting almost exactly what you did.

    BTW, betcha found this in my sig, huh? Gotta change it.

  16. #16
    Jordan Berry
    Join Date
    Oct 2002
    Posts
    307
    your welcome!
    I'm back.

  17. #17
    Tractor Veteran
    Join Date
    Jul 2003
    Posts
    184
    sorry, didnt mean to sound so assy, I just found that funny.

  18. #18
    ...? mxkidz's Avatar
    Join Date
    Jul 2003
    Location
    India
    Posts
    419
    Originally posted by brad_sk88
    um, can I ask who rpgprogrammer is? I havn't been here long.
    I think lukstr was saying that there are too many people making flash rpg games.
    am i right lukstr?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center