Posted By
|
Message
|
bladeboy
Registered 25/07/2003
Points 724
|
18th June, 2004 at 05:54:11 -
is there not a:
+if object is "x" pixels from object
i know ive seen it somewhere but i just seem to find it. is it part of some extension?
so does someone know where to click to get that event?
http://www.geocities.com/monkyjungle
|
The Chris Street Administrator
Unspeakably Lazy Admin
Registered 14/05/2002
Points 48488
|
18th June, 2004 at 06:22:07 -
You'll find it in the expression editor when retriving data from an object.
n/a
|
Cazra Crazy?
Registered 24/07/2002
Points 4472
|
18th June, 2004 at 07:33:47 -
Use this event:
>If (abs(X("object1")-X("object2"))) = N
-actions here
abs retrieves an absolute value. TGF doesn't have the abs expression.
n/a
|
RapidFlash Savior of the Universe
Registered 14/05/2002
Points 2712
|
18th June, 2004 at 11:21:31 -
There's an "If object is (x) pixels away from the screen/border"
http://www.klik-me.com
|
Tigerworks Klik Legend
Registered 15/01/2002
Points 3882
|
18th June, 2004 at 11:45:34 -
Snerlin's method will only give you the difference between the X co-ordinates of the objects, not the distance between them.
You can either use the pythagoras theorum:
distance = Sqrt(x difference ^ 2 + y difference ^ 2)
Or use the Angle Calculator object. In fact loads of objects have the distance formula built in, such as Advanced Math, probably Maths Army Knife (cant remember), Iso Grid 2, even DirectSound.
- Tigerworks
|
|
|