00:00
00:00
I-smel
Hey look man, my name's "I-smel". What I lack in smarts, I at least pay back in honesty. Boink!

Tom Brien @I-smel

Age 32, Male

England, MAN-CHESTer

Joined on 3/2/06

Level:
1
Exp Points:
10 / 20
Exp Rank:
> 100,000
Vote Power:
1.50 votes
Rank:
Civilian
Global Rank:
> 100,000
Blams:
0
Saves:
17
B/P Bonus:
0%
Whistle:
Normal
Trophies:
12
Medals:
473
Supporter:
11m 29d
Gear:
2

Comments

Awesome...
*bookmarks*

THATS BRILLIANT MAKE IT A GAMEAERESTRHT

hmm. my friend! Just use one big rectangle for all the range of the bullet!!

Well your friend's an absolute fucking docile bastard.

pretty realistic, definately alot more like an actual bullet than slow moving projectiles.

I'm sorry.

assuming your mans instance name is MAN, put this in the frame in which he belongs

var cosNum:Number = (Math.cos(R*(Math.PI/180)));
var sinNum:Number = (Math.sin(R*(Math.PI/180)));
function onMouseDown(){
var hit:Boolean = false;
var i:Number = 0

while(!hit && range<30){
var BP:Point = new Point(MAN._x+(i*20)*cosNum,MAN._y+(i*
20)*sinNum)
if (_root.ground.hitTest(BP.x,BP.y, true)) {
hit = true;
trace("HIT AT RANGE:"+range + " AT X POSISTION:"+BP.x+ " AND Y POSISTION:"+BP.y)
}
}
}

same code - far less CPU intensive - although there are still better ways of doing it.

Whoopsy doodle, this is AS2, so no point class

use just generic object instead

var BP:Object = new Object(....

Whoopsy doodle version 2

Man I'm failing tonight

here be the real code

var cosNum:Number = (Math.cos(R*(Math.PI/180)));
var sinNum:Number = (Math.sin(R*(Math.PI/180)));
function onMouseDown(){
var hit:Boolean = false;
var i:Number = 0
while(!hit && range<30){
var BP:Point = new Point(MAN._x+(i*20)*cosNum,MAN._y+(i*
20)*sinNum)
if (_root.ground.hitTest(BP.x,BP.y, true)) {
hit = true;
trace("HIT AT RANGE:"+i + " AT X POSISTION:"+BP.x+ " AND Y POSISTION:"+BP.y)
}
i++
}
}

That's a great thing, thanks. :DDDD