The Daily Click ::. Forums ::. Klik Coding Help ::. help with "else" factors (negations)
 

Post Reply  Post Oekaki 
 

Posted By Message

zharkman



Registered
  01/03/2009
Points
  27
9th May, 2010 at 02:16:14 -

hey there, i have a problem hear (as always)
you see, i made a little enemy, it has a path movement which make him go to a side then backwards and repeats it endlessly, i gave him a "vision range" by making a triangle almost invisible that stais in his "eye" and turns around with it, i made it so when the player gets colissioned with the view, the thingy, stops, and turns to the player (this is so i get error free on the 2 sides it looks at), and shoots, if im in the "view range" that is.
here comes my problem:
how can i make it so the thing goes back to walking as normal when it is not colliding the player with its vision?
here is kinda what the code is:

-------------------------------------------
[E] is visible
[E] is in play area
[V] is in play area
[V] collides with [P]
restrict actions for 00"-30
-------------------------------------------
=
-------------------------------------------
select movement2 "stop"
look at 0,0 from [P]
shoot [B] at speed 100 toward 0,0 of [P]
-------------------------------------------

i know i cant negate colissions, but is there any other way i cant make it so it changes back to movement1 "walk around in cicles like an idiot"?

thanks in advance

 
none

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
9th May, 2010 at 02:48:32 -

You can use the condition "Is eye overlapping player" and negate that. It's in the same section as the collisions are.

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  49667

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 32 Winner!Picture Me This Round 42 Winner!Picture Me This Round 44 Winner!Picture Me This Round 53 Winner!
9th May, 2010 at 02:50:26 -

Use movement "start" to start the enemy following it's path again.

 
n/a

zharkman



Registered
  01/03/2009
Points
  27
9th May, 2010 at 03:09:07 -


Originally Posted by Assault Andy
You can use the condition "Is eye overlapping player" and negate that. It's in the same section as the collisions are.


thats the problem, it wont let me negate that either

 
none

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
9th May, 2010 at 03:13:55 -


Originally Posted by zharkman

Originally Posted by Assault Andy
You can use the condition "Is eye overlapping player" and negate that. It's in the same section as the collisions are.


thats the problem, it wont let me negate that either



You should be able to negate it. It's in:

Active > Collisions > Overlapping another object.

Then you right click it and Negate it.

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

zharkman



Registered
  01/03/2009
Points
  27
9th May, 2010 at 03:25:45 -


Originally Posted by Assault Andy

Originally Posted by zharkman

Originally Posted by Assault Andy
You can use the condition "Is eye overlapping player" and negate that. It's in the same section as the collisions are.


thats the problem, it wont let me negate that either



You should be able to negate it. It's in:

Active > Collisions > Overlapping another object.

Then you right click it and Negate it.



ah right, thnx it didnt let me negate the collision, i forgot to change the other one
now, i changed it so it doesnt change to movement 2 "stop", more like just "stop" movement, and then when im not near, continue with "start" command, but well here is something that seems odd
movement path for the thing
-----------------------------

[30] ------------------[30] (with return and loop)

-----------------------------

the thing is, there are certain conditions in which it goes back to walking, but keeps looking in my direction (ex. looking at left while walking to the right)
but this gets fixed as soon as it hits the other node any way to fix it? or thing i should leave it in as a "im watching you" excuse?

 
none
   

Post Reply



 



Advertisement

Worth A Click