The Daily Click ::. Forums ::. Klik Coding Help ::. Hurr, enemy AI
 

Post Reply  Post Oekaki 
 

Posted By Message

Evil-Ville



Registered
  20/12/2004
Points
  283
16th May, 2005 at 09:31:29 -

I need help making an enemy that climbs around platforms. Like.
..........
.-<------.
.o######^.
.|######|.
.|######|.
.V######|.
.------>|.
..........

o=enemy
#=platform
->=Arrow
|
V=Arrow too
.=empty space

Edit: nevermind, the ascii got messed up. You could copy it on notepad though.

Image Edited by the Author.

 
yay

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
16th May, 2005 at 12:01:15 -

you mean that they climb around platforms, like those...spiky things in metroid?

If so, then you could either use a path movement, or you could give it ball movement and do like this:

{negate}(enemy)is overapping backdrop
-set direction to direction of(enemy)+8

(enemy)collides with backdrop
-set direction to direction of(enemy)-8

something like that

 
n/a

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
16th May, 2005 at 12:03:24 -

here's a quick example:
http://www.sitesled.com/members/aggesgams/Platform_Nmy_Example.gam

 
n/a

David Newton (DavidN)

Invisible

Registered
  27/10/2002
Points
  8322

Honored Admin Alumnus
16th May, 2005 at 12:50:57 -

I don't recommend doing a path movement for it because it isn't extensible, and you'd have to have separate objects for different paths.

Instead, you could place invisible detector objects beyond the corners of your platforms so you direct the enemies where to go. If you're feeling really clever, however, you could test against the Collision Mask depending on which direction your object is travelling, and avoid using detectors altogether.

 
http://www.davidn.co.nr - Games, music, living in America

DeadmanDines

Best Article Writer

Registered
  27/04/2006
Points
  4758
16th May, 2005 at 15:30:38 -

put the ascii in CODE tags - that'll preserve the character width and indentation.


Like 123
this
cool, nao?


Image Edited by the Author.

 
191 / 9999 * 7 + 191 * 7

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
16th May, 2005 at 16:50:02 -

wong: yeh, i know, the path movement is very un-customizable, but my other tecnique doesn't need any detectors U_U

 
n/a

Radix

hot for teacher

Registered
  01/10/2003
Points
  3139

Has Donated, Thank You!VIP MemberGOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!
16th May, 2005 at 22:36:33 -

I wrote a detailed post on how to do it last night, but TDC fucked up and I closed the browser.
Basically do what Wong said with the corner detectors. Path movement is retarded.

 
n/a

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
16th May, 2005 at 23:24:24 -

i have a more complicated problem. in the phisycs department. im making a worms esque type game except with vehivhles like tanks en such. to make the projectiles arc im using something like

-PL1 pressed fire 1
and ("projectile")<1
then shoot ("projectile") towards ("sight")
set Value A("projectile") to X("projectile")
set Value B("projectile") to 24
-X("projectile")>Value A("projectile")
and B("projectile")<>dir("projectile")
every 0'00''10'''
then set dir("projectile") to dir("projectile")-1
-X("projectile")<Value A("projectile")
and B("projectile")<>dir("projectile")
every 0'00''10'''
then set dir("projectile") to dir("projectile")+1


this works but when direction is like dir 7 or 9 it makes it go high up relly far over and down-not high up a little over and then down like it would when you throw a ball up into the air. any one got a more realistic aproach.

also for a computer AI how would i make it so it shoots at a higher angle the farther away i am.

 
n/a

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
17th May, 2005 at 02:01:14 -

legendkpr, please create a new thread for a differant problem. Please also try and use proper spelling and grammar as it helps others to understand your problem better.

 
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

Evil-Ville



Registered
  20/12/2004
Points
  283
17th May, 2005 at 03:39:38 -

Thank you all, I am currently using agge's one because it's the easiest one. Too bad it can only climb on simple shapes as rectangles but I guess I can live with that.

 
yay

Radix

hot for teacher

Registered
  01/10/2003
Points
  3139

Has Donated, Thank You!VIP MemberGOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!
17th May, 2005 at 05:03:24 -

Using detectors at the corner of your platforms is [b]extremely[/b] easy, and will allow your dudes to climb anything. Just create four different invisible detectors, named Left, Up, Down and Right, and make it so that your enemy faces that direction when overlapping the corresponding object.

 
n/a

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
17th May, 2005 at 09:26:01 -

yes but that takes alot of objects an takes more work! lollylol! ur pwned, my tecnique rulez!!

 
n/a

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
17th May, 2005 at 13:10:49 -

Assault andy: ill start a new feed but what is this about spelling and grammer. theres only like two spelling errors that dont make what i wrote any less understandable and its not like im writing an essay. if someone wants to know what im saying because they dont understand the wording they can ask.

 
n/a

Radix

hot for teacher

Registered
  01/10/2003
Points
  3139

Has Donated, Thank You!VIP MemberGOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!
18th May, 2005 at 00:31:23 -

Or you could try not typing like a six-year-old to begin with.

 
n/a

卍 chicken14528 卍



Registered
  19/12/2004
Points
  330
18th May, 2005 at 00:38:23 -

haha pwn

 
n/a
   

Post Reply



 



Advertisement

Worth A Click