4 Replies - 4638 Views - Last Post: 05 September 2009 - 10:06 AM

#1 boburmum1  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 08-April 08

how do i make a flash RPG

Posted 08 April 2008 - 11:25 AM

im trying to make a flash RPG and i dont know how to make my hero pick up coins. here is my code.
onClipEvent(load){
speed=7;
}
onClipEvent(enterFrame)
if (Key.isDown(Key.UP)) {
_y-= speed;
}
if(Key.isDown(Key.DOWN)){
_y+=speed;
}
if(Key.isDown(Key.RIGHT)){
_x+=speed;
}
if(Key.isDown(Key.LEFT)){
_x-=speed;
}
}


i also want a start screen but i dont know how to make thee start screen.

Is This A Good Question/Topic? 0
  • +

Replies To: how do i make a flash RPG

#2 girasquid  Icon User is offline

  • Barbarbar
  • member icon

Reputation: 108
  • View blog
  • Posts: 1,825
  • Joined: 03-October 06

Re: how do i make a flash RPG

Posted 08 April 2008 - 06:10 PM

Look into something called hitTest - it will allow you to do collision checking, which is probably what you'll want(at least at first) to allow the hero to pick up coins as he collides with them.
Was This Post Helpful? 0
  • +
  • -

#3 fdamours  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 01-April 09

Re: how do i make a flash RPG

Posted 01 April 2009 - 07:55 AM

View Postgirasquid, on 8 Apr, 2008 - 05:10 PM, said:

Look into something called hitTest - it will allow you to do collision checking, which is probably what you'll want(at least at first) to allow the hero to pick up coins as he collides with them.



If you are Using AS3, its HitPoint ( so you don't get confused :) )
Was This Post Helpful? 0
  • +
  • -

#4 BetaWar  Icon User is online

  • #include "soul.h"
  • member icon

Reputation: 1138
  • View blog
  • Posts: 7,110
  • Joined: 07-September 06

Re: how do i make a flash RPG

Posted 01 April 2009 - 02:52 PM

Quote

If you are Using AS3, its HitPoint ( so you don't get confused )


Or you can use hitTestObject(MOVIECLIP_HERE) to check if it hits anywere within the bounding box of the movieclip.
Was This Post Helpful? 0
  • +
  • -

#5 brizick  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 13
  • Joined: 09-March 09

Re: how do i make a flash RPG

Posted 05 September 2009 - 10:06 AM

hmm maybe like this?
onClipEvent (load) {
	speed = 7;
	function pickCoin() {
		if (this.hitTest(_root.coin)) {
			_root.coin._visible = 0; //dissapearing your coin, but it actually didn't dissapear, you can type your action here like score +=100 or what...
		}
	}
}
onClipEvent (enterFrame) {
	if (Key.isDown(Key.UP)) {
		_y -= speed;
	}
	if (Key.isDown(Key.DOWN)) {
		_y += speed;
	}
	if (Key.isDown(Key.RIGHT)) {
		_x += speed;
	}
	if (Key.isDown(Key.LEFT)) {
		_x -= speed;
	}
	pickCoin(); // calling function every time you enter the frame
}


Was This Post Helpful? 0
  • +
  • -

Page 1 of 1