Be a Supporter!

As2 Help My Cat My Cat!

  • 355 Views
  • 9 Replies
New Topic Respond to this Topic
HypNosE777
HypNosE777
  • Member since: Mar. 5, 2009
  • Offline.
Forum Stats
Member
Level 05
Blank Slate
As2 Help My Cat My Cat! 2010-08-14 05:40:41 Reply

Allright so first off i wanna say before you say anything about the game and stuff then I kinda made a post about it here

"im gonna try to make this simpel"

So if you go on top of the tree you will see cat on a airballon.
Then what i want to do is that the cat wil have 3 phases

Famee 1 (when i haven't been on the airballon at all)
Frame 2 (when i jump on the airballon and it turns all O_O)
Frame 3 (when i go off the airballon and it will be all mad)

so what i kinda wanna make is that when im up there it will go to a frame 2 and off frame 3 and then before i'v been there at all it will have a frame 1 as a nothing happend kinda ish motion)

onClipEvent (keyUp) {
if (_root.player.hitTest(this)) {
if (this._currentframe == 1) {
this.gotoAndStop(2);
}
}
}

that is the code I have on it now, but im not a scripter so i have no clue what the hell to do :b all my codes are things i got from engiens and from the web

Try the Test here

I hope i explained well enugh for you to understand what i want help with (:
and yeah btw, i have no intentions on makeing this a acturel game, this is just learn and trying out stuff that i can do with flash (:

Thank you for takeing your time and hope that you can help me out
sorry for my bad english speling

/HypNosE777 . bonewire


BBS Signature
AdmittingZero
AdmittingZero
  • Member since: Mar. 21, 2010
  • Offline.
Forum Stats
Member
Level 02
Blank Slate
Response to As2 Help My Cat My Cat! 2010-08-14 05:56:57 Reply

I guess have a boolean.

It starts as false.

When you get on the tree it checks if its false, if it is, then you haven't seen it yet; so do whatever it is that you wanted to do.
If it's true already.. then you've already been on top of the tree and seen it.

Then you can check on the player if you're on top of the balloon. If you are, but weren't before, then you obviously just got on the balloon. And that works vice versa.

Any code I could give you would epicly fail, so I feel the general idea of how to do it would serve you better.


MSN/Email-> kevin.stubbs@live.com -Need artists!
The 9th Legion
(Looking for somebody to create the site for $$$).

HypNosE777
HypNosE777
  • Member since: Mar. 5, 2009
  • Offline.
Forum Stats
Member
Level 05
Blank Slate
Response to As2 Help My Cat My Cat! 2010-08-14 05:57:00 Reply

there is a picture of the cat here so you know what to look for

As2 Help My Cat My Cat!


BBS Signature
HypNosE777
HypNosE777
  • Member since: Mar. 5, 2009
  • Offline.
Forum Stats
Member
Level 05
Blank Slate
Response to As2 Help My Cat My Cat! 2010-08-14 06:06:13 Reply

@AdmittingZero - 8/14/10 05:56 AM,

mhmm i kinda get a idér, but i have bearly any scripting expirents at all.

but i was thinking issn't there a way like

Frame1 Player never touched the sympel, but if it do goToAndStop this frame 2

Frame2 plays when the player touch the cat sympel but if he moves away from the sympel then goToAndStop this Frame3

Frame3 pretty much the same as frame1 just that it wont ever go back to frame 1 only cykel betwine the cat sympels frame 2 and 3


BBS Signature
AdmittingZero
AdmittingZero
  • Member since: Mar. 21, 2010
  • Offline.
Forum Stats
Member
Level 02
Blank Slate
Response to As2 Help My Cat My Cat! 2010-08-14 06:13:57 Reply

Oh, I think I understand it better now.

So when it starts, just make it go to frame 2.

When the player hits, go to frame 3, and when it's on frame 3 but the player isn't hitting the symbol then go to frame 4.


MSN/Email-> kevin.stubbs@live.com -Need artists!
The 9th Legion
(Looking for somebody to create the site for $$$).

polym
polym
  • Member since: Oct. 2, 2007
  • Offline.
Forum Stats
Member
Level 14
Audiophile
Response to As2 Help My Cat My Cat! 2010-08-14 06:17:36 Reply

At 8/14/10 06:13 AM, AdmittingZero wrote:

This isn't hard.

Here's the idea:

FIRST PHASE -> SECOND PHASE
SECOND PHASE <-> THIRD PHASE

You need two booleans. One that checks if the player has reached the tree for the first time, and to cycle between the two frames. Or, once you move away from frame one, you might not even need a boolean at all - just make sure you never go back to frame one.

FRAME ONE
If player reaches tree, and you are NOT on frame two, move to frame two.

This starts the cycle.

If player is on frame two, and NOT on frame three or frame one, then go to frame three.
If player is on frame three, and NOT on frame two or frame one, then go to frame two.

As you can see you never go back to frame one, but you still only need one boolean.

AdmittingZero
AdmittingZero
  • Member since: Mar. 21, 2010
  • Offline.
Forum Stats
Member
Level 02
Blank Slate
Response to As2 Help My Cat My Cat! 2010-08-14 06:27:38 Reply

Ohh I misread, listen to polym.


MSN/Email-> kevin.stubbs@live.com -Need artists!
The 9th Legion
(Looking for somebody to create the site for $$$).

HypNosE777
HypNosE777
  • Member since: Mar. 5, 2009
  • Offline.
Forum Stats
Member
Level 05
Blank Slate
Response to As2 Help My Cat My Cat! 2010-08-14 07:08:39 Reply

how would i code that then :i ?

what codes on what sympel and frames


BBS Signature
polym
polym
  • Member since: Oct. 2, 2007
  • Offline.
Forum Stats
Member
Level 14
Audiophile
Response to As2 Help My Cat My Cat! 2010-08-14 07:33:41 Reply

At 8/14/10 07:08 AM, HypNosE777 wrote: how would i code that then :i ?

what codes on what sympel and frames

Here's pseudo code:

bool first, second, third;
first = second = third = false;

if (first == false && player.touches(tree))
     second = true;

if (second == true && third == false && !player.touches(tree))
{
    second = false;
    third = true; 
}

if (third == true && second = false && player.touches(tree))
{
    second = true;
    third = false;
}

No offense but if you can't figure out things for yourself, you shouldn't be programming. Everyone starts out slow but the whole concept of programming is solving problems.

HypNosE777
HypNosE777
  • Member since: Mar. 5, 2009
  • Offline.
Forum Stats
Member
Level 05
Blank Slate
Response to As2 Help My Cat My Cat! 2010-08-14 07:44:34 Reply

i know im not a programmer either im a artist (: i just want some basic stuff i can play around in, and make some fun stuff around to interact with :b but thanks pal


BBS Signature