Only horizontal movement for player, free movement for enemies?

  • Thread starter Thread starter DesignerSpecial
  • Start date Start date
D

DesignerSpecial

Guest
Would anyone happen to know how to lock the player's movement to only left and right (but still enable the up and down keys for special attacks) but allow enemies to move normally? It's for a first person-type game, so the player needs to move on a rail.

Thanks in advance for any advice.
 
Have you tried using wall to block player's movement in z?
The wall also seperate area for player and enemies. Enemies are blocked by the wall too but their attackbox can pass through wall so it should be okay.
 
That's what I originally did when I made a rough version last year, but the enemy AI was a little annoying. They either rushed the wall and didn't move much to the left or right once they reached it, or they just wandered all around way out of the player's hit range. I'll try it again if that would be the recommended solution though, thanks.

btw, is the link to the OpenBOR manual in your signature the most recent version? I think a lot of features were added since I last used it and I'd like to catch up. Thanks again.
 
btw, is the link to the OpenBOR manual in your signature the most recent version?

Not yet updated, I'm too busy :)

Enemy AI is another problem. I had to make new and simpler AI for enemies in Contra mod cause default AI doesn't fit for 2D mods.
Though, have you tried aimove chasex?
 
I'm having a problem that is likely just something I'm overlooking, but I can't figure it out. Can't really set up walls until I get this fixed...

I need to have the player spawn at the bottom-center of the playing area (which is 640x480), at 320, 480 or so. In my Levels.txt file, z is 100, 480 (100 pixel buffer at the top, none at bottom). No matter what values I use though, the player spawns just slightly below the center of the screen, something like 320, 300. Can anyone tell me why I can't have him spawn any lower?

Thanks in advance.
 
Are you using spawn1 command? this is the command to define starting and respawn coordinate of player in a level.

If that doesn't work, there's script solution :)
 
Yes, using spawn1. I was able to do this a long time ago, but that might have been at 320x240 resolution. Do you happen to know if anything has changed that would not allow a player to be spawned below 240?

If scripting is required, I'll need a bit more help (I know nothing about OpenBOR scripting, not even where it goes).

Thanks so far.

 
Hmmm... you are right. Seems like the limit in spawn# command is not adjusted for high resolution mods. This must be reported.

Actually I was going to suggest entity to force starting point however I realized that that entity doesn't adjust respawning point.
So I don't know when coders are going to fix this but I can offer script in player's SPAWN and RESPAWN (if you have this one) to forcefully change starting point.
What do you think?
 
Can you report it or should I? I've never reported an OpenBOR issue before, I don't even know who to send it to.

Any script you could offer would help, as I cannot proceed at all with my mod if the player can't spawn at the bottom-center of the screen. If you do, please also tell me where it goes, as I'm completely unfamiliar with OpenBOR script.

Much appreciated.
 
Bloodbane said:
Hmmm... you are right. Seems like the limit in spawn# command is not adjusted for high resolution mods. This must be reported.

It does. But you are right that part is some kind of legacy code and designed for 320x240.

Let me see if I can remove the limit.
 
Back
Top Bottom