STORY LOOP FURRY PORN GAMES C SERVICES [?] [R] RND POPULAR | Archived flashes: 229595 |
/disc/ · /res/ — /show/ · /fap/ · /gg/ · /swf/ | P0001 · P2595 · P5190 |
Visit the flash's index page for basic data and a list of seen names.
Threads (1):
File :[ball test.swf] - (2 KB) [_] [G] beginner at flash coding, need help Anon 978595 Just trying to get the basics of a game going here. I'm really a beginner at flash so any help appreciated I've got the ball moving around but the collision isn't working correctly as you can tell if you play around with it for a bit What do I do? >> [_] script on ball Anon 978597 onClipEvent (enterFrame) { if (Key.isDown(Key.LEFT)) { _x=_x-10; } if (Key.isDown(Key.UP)) { _y=_y-10; } if (Key.isDown(Key.RIGHT)) { _x=_x+10; } if (Key.isDown(Key.DOWN)) { _y=_y+10; } if (hitTest(this._parent.rBlock)==true) { _x=_x-10; } if (hitTest(this._parent.lBlock)==true) { _x=_x+10; } if (hitTest(this._parent.bBlock)==true) { _y=_y-10; } if (hitTest(this._parent.tBlock)==true) { _y=_y+10; } if (hitTest(this._parent.cBlock)==true) { _x=_x-10; } if (hitTest(this._parent.cBlock)==true) { _x=_x+10; } if (hitTest(this._parent.cBlock)==true) { _y=_y-10; } if (hitTest(this._parent.cBlock)==true) { _y=_y+10; } } >> [_] Anon 978601 Pretty good stuff, bro. Though, does Flash have something like a SWITCH or CASE statement? If it does, it might make for tidier programming. >> [_] Friendsofsandwiches 978613 That reminds me, anyone seen anything more on the Tornado flash guy? >> [_] tinycat !!NqU6wU7JQ+v 978617 >'ve got the ball moving around but the collision isn't working correctly as you can tell if you play around with it for a bit call it a feature and design a game around it. >> [_] Anon 978625 fail, this is square collision detection, not circle >> [_] Anon 978733 Your ball move correctly, however since I assume the center black block should be inaccessible, there's problems: the right and bottom edge of the block can be passed through, and goes right through the block, only entry into the block via the left or top edges is prevented. |
|