I have this monster that shoots when you're far and uses a large melee attack when you're too close. The monster is located further within the level, and, with my current setup, he shoots objects every 2'25 seconds, even when not on screen. But I don't want him to!
I would like it to only have him shoot when he is visible on the screen, now, how would I go about that? Thanks guys.
Death in the air
Strapped in the electric chair
This can't be happening to me
Who made you God to say
"I'll take your life from you!!"
Assault Andy Administrator
I make other people create vaporware
Registered 29/07/2002
Points 5686
24th November, 2003 at 02:45:41 -
* enemy.x =< X right Frame
+ enemy.x => X Left Frame
+ enemy.y => Y bottom Frame
+ enemy.y =< Y top frame
Then allow shooting. There's probabley a simplier way somewhere - but make sure you pick "coordinate of visible edge" under frame expressions.
Yea, I have tgf. I was waiting to get mmf when the second one comes out.
Anyways, I wanted to know how to make an event where it finds the distance between
the knight and the monster. Maybe that'd be easier. I almost pulled it off but.....
Death in the air
Strapped in the electric chair
This can't be happening to me
Who made you God to say
"I'll take your life from you!!"
Assault Andy Administrator
I make other people create vaporware
Registered 29/07/2002
Points 5686
24th November, 2003 at 22:44:35 -
Maths, if you don't know the formula for that then there are many extensions that have that function built into them. Such as the advanced maths, the advanced direction something and mainly all the maths ones.
LLP, there's a distance formula that I actually got working not too long ago and it really wasn't that hard to impliment; and I'm not even that good at math. Just look up the distance formula on google or something and put it in. It's not so bad. And it works too!
you could always make an active object the same size as the window, uncheck the follow the frame box and make it invisble. then only let the monster shoot if its overlapping the object.
"If Darl McBride was in charge, he'd probably make marriage unconstitutional too, since clearly it de-emphasizes the commercial nature of normal human interaction, and probably is a major impediment to the commercial growth of prostitution."
-- Linus Torvalds, December 5th 2003.
(Darl McBride is CEO of The SCO Group)
this place sucks but don't tell anyone, it's our little secret, ok?