The Enchanted Cave 2
Delve into a strange cave with a seemingly endless supply of treasure, strategically choos
4.38 / 5.00 36,385 ViewsGhostbusters B.I.P.
COMPLETE edition of the interactive "choose next panel" comic
4.07 / 5.00 13,902 ViewsI have this game, where the background is about 2500x2500. The player can rotate itself 360 and then move the way the MC is facing. How can I make the background follow it?
At 6/4/06 05:45 AM, Re2deemer wrote: I have this game, where the background is about 2500x2500. The player can rotate itself 360 and then move the way the MC is facing. How can I make the background follow it?
Make everything inside a movieclip, then put this AS on it
onClipEvent(enterFrame){
this._x=-player._x+Stage.width/2;
this._y=-player._y+Stage.height/2;
}
that will make it follow an mc with the instance name 'player'
Here's a hint: if the player goes right, the background should then go left, eh?
If you go up, background goes down.
Go figure it out.
At 6/4/06 05:47 AM, -Gust- wrote: Here's a hint: if the player goes right, the background should then go left, eh?
If you go up, background goes down.
Go figure it out.
Ha! for once YOU have the bad way of doing it! <3
At 6/4/06 05:47 AM, RyanPridgeon wrote:
Make everything inside a movieclip, then put this AS on it
onClipEvent(enterFrame){
this._x=-player._x+Stage.width/2;
this._y=-player._y+Stage.height/2;
}
that will make it follow an mc with the instance name 'player'
nahh...didn't work...
At 6/4/06 05:48 AM, RyanPridgeon wrote: Ha! for once YOU have the bad way of doing it! <3
Doing what? Giving hints?
At 6/4/06 05:59 AM, -Gust- wrote:
Doing what? Giving hints?
onClipEvent (enterFrame) {
if(Key.isDown(Key.RIGHT)) {
this._x=_x-10;
}
}
onClipEvent (enterFrame) {
if(Key.isDown(Key.LEFT)) {
this._x=_x+10;
}
}
onClipEvent (enterFrame) {
if(Key.isDown(Key.UP)) {
this._y=_y-10;
}
}
onClipEvent (enterFrame) {
if(Key.isDown(Key.DOWN)) {
this._y=_y+10;
}
}
Did you mean a code like this? if you did, then you gave a wrong hint. read the question carefully, especcially the part about my MC
At 6/4/06 10:04 AM, Re2deemer wrote: Nooo....!
http://bay01.imageba..w=4588_Onslaught.swf
a simple example
my bad....WASD to move
No, I didn't read it wrong. It was you who took my hint wrong.
Okay, here's a bigger hint:
If the player goes up by 3.452367 and right by 2.744761, then relatively the rest goes 3.452367 down and 2.744761 left.
Any better? -_-