PDA

View Full Version : AS is really pissing me off >.<+


Evilx100
06-12-2006, 09:24 PM
Yeh can some one help me -with this code, I dont know what is wrong.
----------------------------------------------------------
onClipEvent(enterFrame){
if(_root.player.hitTest(_root.beatup)){
if(_root.inv1(2)){
_root.punch1.gotoAndStop (2);
}
}
--------------------------------------------------------------
Like i am trying to make it when the player steps on a place and he has brass knuckles he can press a button that appears to punch him, but the button doesn't appear.:( plz help.

Freddy
06-12-2006, 09:26 PM
whats _root.inv1(2) supposed to be?
Unless it's a user made function I dont think it'll do anything.

Elite Force
06-12-2006, 09:29 PM
what are you talking about

Evilx100
06-12-2006, 09:31 PM
the _root.inv1(2); is a symbol, inv1 is the instance name and 2 is the frame number.
http://s54.photobucket.com/albums/g96/Evilx100/?action=view&current=stickrpgme.swf
Thats the game so far, and the blue sqaure is the beat up thing.

Elite Force
06-12-2006, 09:33 PM
your wierd. Wierdo. Freaky Wierdo. I'm kidding

Freddy
06-12-2006, 09:44 PM
ok.
So I guess you want to check if 'player' hits 'beatup'. If he does, you want to check to see if 'inv1' is in the second frame. Then if all of that's true, you want 'punch' to go to the second frame.

hmm..
instead of if(_root.inv1(2)){ try if(_root.inv1._currentframe == 2)){


and btw Elite Force, you're a moron.

Evilx100
06-12-2006, 09:52 PM
thanks shadow000, now its works!

Freddy
06-12-2006, 09:54 PM
woot!

We didn't need to get Brown Cow in here!
-mission accomplished-

Evilx100
06-12-2006, 10:02 PM
http://i54.photobucket.com/albums/g96/Evilx100/stickrpgmev2.swf
:D:D:D:D:D:D

Insane Knux
06-12-2006, 10:43 PM
Nice. Looks like a fun game.

Insane Knux
06-12-2006, 10:44 PM
your wierd. Wierdo. Freaky Wierdo. I'm kidding Dude wtf, that was a random post. A waste of a post. Quit doing it.

medina9.2
06-12-2006, 11:15 PM
a

Malignus
06-12-2006, 11:52 PM
Hey Evil, that's pretty nifty. You might want to lower the range on that Beat Him Up option though--I somehow beat up the gangster with my brass knuckles with a closed door in between us. :)

Aquamenti
06-13-2006, 01:33 AM
All I can do is watch a image, when some green guy says: "Hey man, wanna buy some *cough* brass knucles?" and theres some orange guy with.. a dress? And a man with hat and gun outside door and I can do nothing.

cryzabey
06-13-2006, 03:01 AM
did u click the screen fisrts = P

Aquamenti
06-13-2006, 07:31 AM
Yes I did.

derry
06-13-2006, 08:07 AM
and move with arrow keys?

Aquamenti
06-13-2006, 09:10 AM
Oh I did not.

Aquamenti
06-13-2006, 09:14 AM
And if I buy the knuckles, kill the guy, then what next?

cryzabey
06-13-2006, 09:33 AM
he's not done yet = P

Aquamenti
06-13-2006, 09:36 AM
Okay.