The Enchanted Cave 2
Delve into a strange cave with a seemingly endless supply of treasure, strategically choos
4.39 / 5.00 38,635 ViewsGhostbusters B.I.P.
COMPLETE edition of the interactive "choose next panel" comic
4.09 / 5.00 15,161 Viewsim making a game and at the moment im using V-Cam so the background scrolls as the player moves, but i cant figure out how to make it so the HealthBar stays on screen and the same for the Score.
so im wondering is there any other way i can make the background scroll when the player moves?
if so, can anyone link a tutorial?
(im using Flash8, AS2)
thanks!
Just set it relative to the position of the vcam.
[6,11,4,10,2,10,-68,5,15,-68,16,4 ,1,-68,-2,1,15,16,-67].map(function(v){ return String.fromCharCode(v + 100) }).join(""); // updated for web 2.0!
At 7/10/09 02:27 PM, Veranan wrote: im making a game and at the moment im using V-Cam so the background scrolls as the player moves, but i cant figure out how to make it so the HealthBar stays on screen and the same for the Score.
so im wondering is there any other way i can make the background scroll when the player moves?
if so, can anyone link a tutorial?
(im using Flash8, AS2)
thanks!
Indeed there is. Do you mean like this?:
http://spamtheweb.com/ul/upload/100709/7 0432_Cool_BG_move.php
It was rushed btw.
At 7/10/09 02:34 PM, MikeyTheYoshi wrote: Indeed there is. Do you mean like this?:
http://spamtheweb.com/ul/upload/100709/7 0432_Cool_BG_move.php
well, i want it so when the Player moves, it(player) stays in the middle of screen while everything else scrolls. but im having a problem doing that with V-Cam because if i put a HealthBar and i test the game the healthbar doesnt scroll with the V-Cam.
i've tried using the code
_x+=(_root.TARGET._x-_x)/1
but i cannot put this code onto dynamic text (which brings up the problem with the Score)
At 7/10/09 02:33 PM, johnfn wrote: Just set it relative to the position of the vcam.
the V-Cam follows the player.
At 7/10/09 02:53 PM, Veranan wrote:At 7/10/09 02:33 PM, johnfn wrote: Just set it relative to the position of the vcam.the V-Cam follows the player.
There is a very easy way to do this. It involves me taking away about 5 seconds of your time. Simply take the health bar and put it inside of your v-cam. Now you have the hpBar working and scrolling with your player without it going off the screen.
06-17-11: User of the Day
07-25-11: 1500th Post
08-09-11: Level 13!
At 7/10/09 03:02 PM, U-Gamer wrote: There is a very easy way to do this. It involves me taking away about 5 seconds of your time. Simply take the health bar and put it inside of your v-cam. Now you have the hpBar working and scrolling with your player without it going off the screen.
i put the HealthBar inside the V-Cam MC and when i test it i cant see the HealthBar (i put it on a new layer inside the MC)
try setting the health bar's movieclip to the same size as the stage, with the healthbar right where you want it on the screen. then take the script that makes the vcam follow the player and apply it to the healthbar's movieclip. this should work and can be done for everything you want to stay in one place on the screen. Preferrably, put all the movieclips, healthbar and such, in the same movieclip. makes it easier.
At 7/10/09 04:39 PM, RadMad wrote: try setting the health bar's movieclip to the same size as the stage, with the healthbar right where you want it on the screen. then take the script that makes the vcam follow the player and apply it to the healthbar's movieclip. this should work and can be done for everything you want to stay in one place on the screen. Preferrably, put all the movieclips, healthbar and such, in the same movieclip. makes it easier.
ok i got that to work with the HealthBar but when i try to put the Dynamic Text (Score Counter) into a MC and put the code i used for V-Cam, the score counter doesn't seem to work (not counting).
how can i fix that?
Here's the code to make the Vcam follow the player back and forth
onClipEvent(enterFrame){
_x+=(_root.Instancenamehere._x-_x)/2
}
And here's the code to make the Vcam follow the player in all directions
onClipEvent(enterFrame){
_x+=(_root.Instancenamehere._x-_x)/2
_y+=(_root.Instancenamehere._y-_y)/2
}
All code goes into Vcam Movieclip.
i like nachos... yea
At 7/10/09 06:20 PM, FalconPuuunch wrote: Here's the code to make the Vcam follow the player back and forth
i knew this already. thanks though!
my question now is how do i make it so Dynamic Text (score counter) follows the player and still works?
At 7/10/09 06:38 PM, Veranan wrote:At 7/10/09 06:20 PM, FalconPuuunch wrote: Here's the code to make the Vcam follow the player back and forthi knew this already. thanks though!
my question now is how do i make it so Dynamic Text (score counter) follows the player and still works?
have a varible called var score:number = 0;
and add to it when you want the score to increase.
you can make it attach to the player by converting to a movieclip and doing something like this:
scorebox.y = player.y
scorebox.x = player.x
At 7/10/09 06:41 PM, funkycaveman wrote: you can make it attach to the player by converting to a movieclip and doing something like this:
scorebox.y = player.y
scorebox.x = player.x
i converted the Dynamic Text to a MovieClip but now its not working.
yopu mean something like
this._x = 0-player._x/2
dont feel like making the full script right now. -_-
My friend's sister plays wizard 101....
she's 17.....
wtf?