|
#1
|
||||
|
||||
|
I'm needing help for something.
First thing: I have a custom cursor (instance name cursor_mc) and when you move it, like any other cursor, when you stop, it stops. What I'd like to do is applye slight easing to the cursor, like in particle blaster. Any help on that one? Second: I have a small movieclip (instance name pickup) and I would like to be able to generate random numbers of them that fall down the screen until they dissappear off it, and my character has to pick them up in the air to raise his score. Any code I could have for that?
__________________
'Lo peoples. I'm NiallTL (Neel Tee Ehl). Eh, I don't have to put effort into this, do I?
|
|
#2
|
|||||||||
|
|||||||||
|
Quote:
Code:
mycursor._x = _xmouse; mycursor._y = _ymouse; For some basic easing try something like: Code:
xdif = _xmouse - mycursor._x; ydif = _ymouse - mycursor._y; mycursor._x += xdif/15; mycursor._y += ydif/15; Quote:
To put them on the stage after a random time use something like this on your main timeline: On 1st frame: Code:
startTime = getTimer(); i = 0; Code:
if(getTimer()-startTime>1000){
i++;
attachMovie("poo", "poo"+i, i);
startTime=getTimer();
}
Note: you could also put the code I mentioned earlier to move the cursor on this 2nd frame too). On 3rd frame: Code:
gotoAndPlay(2); Then what you need is some code on the poo movie clip to: on load: give it a random _x position on enter frame: increase it's _y position. perform a hittest to see if it colided with your cursor. check if it went off the screen and needs to be deleted. Hope this helps!
__________________
|
|
#3
|
|||||||||
|
|||||||||
|
Quote:
__________________
(\ (\ ( ^_^) (_(")(") This is Bunny. Copy and paste bunny into your sig to help him gain world domination... (\/) (-_-) (")(") This is Bunny's friend. Copy and paste Bunny's friend for back-up... /\_/\ ( .. ) (")(") This is robot-bunny. He will dominate everything who stands in Bunny's path... |\_/| _______. |^^|| ' | |'') |'') Bunny's bodyguard carries a gun everywhere he goes... (\__/) ( O.o) (> < ) Its a demented bunny... (\(\ ~~ be a bunny ~~ (='.')~~ make war ~~ o(_")")~~ not luv ~~ |
|
#4
|
|||||||||
|
|||||||||
|
Quote:
![]() I actually laughed when I saw this. ![]()
__________________
Last edited by Bigmutha; 03-22-2008 at 09:37 PM. Reason: Automerged Doublepost |
|
#5
|
||||
|
||||
|
Yeah.... slight problem Gaz.
None of that worked. At all. I am not best pleased ![]() I'm currently PM'ing you the file to see if you can help a tad.
__________________
'Lo peoples. I'm NiallTL (Neel Tee Ehl). Eh, I don't have to put effort into this, do I?
|
|
#6
|
|||||||||
|
|||||||||
|
Oops! Well I wrote it off the top of my head, hang on I'll give it a try.
__________________
|
|
#7
|
|||||||||
|
|||||||||
|
Ah yeah I found a couple of typos (fixed now).
You can see the code in action here: Watch Out For Poo! - The Game Homepage I also attached the .fla to this post. - If that doesn't make you best pleased I don't know what will ![]()
__________________
|
|
#8
|
|||||||||
|
|||||||||
|
Quote:
__________________
(\ (\ ( ^_^) (_(")(") This is Bunny. Copy and paste bunny into your sig to help him gain world domination... (\/) (-_-) (")(") This is Bunny's friend. Copy and paste Bunny's friend for back-up... /\_/\ ( .. ) (")(") This is robot-bunny. He will dominate everything who stands in Bunny's path... |\_/| _______. |^^|| ' | |'') |'') Bunny's bodyguard carries a gun everywhere he goes... (\__/) ( O.o) (> < ) Its a demented bunny... (\(\ ~~ be a bunny ~~ (='.')~~ make war ~~ o(_")")~~ not luv ~~ |
|
#9
|
|||||||||
|
|||||||||
|
the name is very deceptive! you're meant to 'Get hit by poo!' lmfao..
|
|
#10
|
||||
|
||||
|
Thanks so much Gaz, I'll try it out when I get onto my own computer
I'll credit you for helping in my game ![]() Who knows, if I extend my game a bit I might get a frontpage on TGH when I submit! Ah, hopes and dreams ![]() I'll report back when I've tried all the stuff out.
__________________
'Lo peoples. I'm NiallTL (Neel Tee Ehl). Eh, I don't have to put effort into this, do I?
|
| Sponsored Links |
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|