Flying/walking enemies

Are you experiencing a problem? Maybe you can't get your scripts to do what you need, or are frustrated by a feature you just can't seem to get working? Let us know about it here and we will try our best to help you out!
Post Reply
CeeJay
Posts: 224
Joined: Sat Jan 26, 2013 9:56 am

Flying/walking enemies

Post by CeeJay »

Is there a way to make enemies switch between walking and flying depending on the current situation?

Switching to walking when they land on the floor, switching to flying when they need to ascend to reach the player or when they walk off a ledge.

User avatar
RUNSABER
Posts: 132
Joined: Sat Mar 14, 2015 3:10 pm

Re: Flying/walking enemies

Post by RUNSABER »

You can call states for things via RTS to force FLY & CHASE states onto things. You can also use JUMP commands interchangeably for smooth effects. And for dropping off ledges, make sure you dont have EDGEWALKER as a SPECIAL. They'll fall from cliffs and ledges, and you can use FALL states for when the enemy drops down.
Official 3DGE64 Project Portal - Public Repository for 3DGE 64.

CeeJay
Posts: 224
Joined: Sat Jan 26, 2013 9:56 am

Re: Flying/walking enemies

Post by CeeJay »

FALL states, does that work for non-players?

User avatar
RUNSABER
Posts: 132
Joined: Sat Mar 14, 2015 3:10 pm

Re: Flying/walking enemies

Post by RUNSABER »

Sorry about the confusion, I just read my old post - the FALL state is not a true hard-coded state, but rather a custom defined one. Let's say you were in a low-gravity situation.

EDIT: This methods not only works for non-players, but for ALL things: including items ;)

It would similar to using the flying powerup in Heretic, but if you crossed a certain linedef that is tagged to call RTS, that linedef will trigger immediately upon crossing it.

Code: Select all

START_MAP MAP01
TAGGED_DISABLED
TAG 1 (VERY important, this calls whatever state is linked to RTS_ENABLE_TAG() (X): in this case FALL state)
RADIUS_TRIGGER 0 0 -1 (change parameters to coordinates on map)
SLEEP
END_RADIUS_TRIGGER
END_MAP
Calls to this:

Code: Select all

States(Fall)=NULL:A:0:NORMAL:RTS_ENABLE_TAG(1),
		   NULL:A:0:NORMAL:NOTHING;


This is poorly written from scratch and not tested. But assuming if everything works correctly, when that linedef is crossed, it should make the player stop flying and descend to the ground. Use another trigger to enable another state (FLY), for a seamless transition.

I know we have the wiki now, but I still refer to the old EDGE documentation as there are some gaps missing on the web. Here is the link:
http://edge.sourceforge.net/edit_guide/overview.htm
Official 3DGE64 Project Portal - Public Repository for 3DGE 64.

User avatar
Corbachu
Site Admin
Posts: 778
Joined: Fri Jun 08, 2012 11:22 am
Gender:
Contact:

Re: Flying/walking enemies

Post by Corbachu »

What's missing from the old tutorial site versus the Wiki? AFAIK the Wiki is more up-to-date than the old stuff.
\(סּںסּَ` )/ۜ

Return to “Support and Help”