Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Straffing with an ABS

Devro

Member

Hey guys Ive just started making a futuristic RPG but I want there to be an ABS which makes projectiles look good.

Basically because its a futuristic game I want to use the Knight Blade tilesets and characters but make them actually fire weapons and stuff. But this is going to be complicated as i want a player to be able to straff. As in from side to side while shooting and then switch back to normal in an instant. Anyone know of the best ABS system to use for such a game or indeed the way I would need to event it in to make such a thing possible.

Also if someone could tell me how I make the right character sets for such a thing too and how to make bullets look good that would be really handy.

Thanks in advance guys
- Devro
 
I'm not sure if anything's been made for this, but you could search Submitted Scripts for one, or request a script to be made.

As for resources, you can ask for help in the Resource Requests section.
 

Devro

Member

Yeah Ive looked into some of the eventing tutorials but I cant find one that handles projectiles for some reason, also none of them would have straffing either. If i wanted to set up straffing via events how would I go about it? Forget the actual x, y variables for projectiles and such I mean just the movement.

I figured it would be something like a parralel process that when you press a button say 'C' it locks the direction your character faces and lets you use the space bar to fire in that direction while moving with the arrow keys along that line. Then when you let go of the 'C' key you go back to normal movement without the possibility of shooting. Am I on to something here? If im honest Im not the best eventer in the world so any advice would be greatly appreciated :)
 
I didn't move it, but it was a bit uncertain whether you wanted a script or an event system.

For straffing, a Parallel Processing Common Event would work. You could try a Conditional Branch that turns "Direction Fix ON" if a button is held, else it turns "Direction Fix OFF".
 

Devro

Member

Ah ok, how about making it so that when someone presses an arrow on the keyboard to move in a certain direction at first all it does is turn the face of the sprite before movement. That way my sprite can stand still and turn using the arrow keys but then when they are held he moves normally. Something like this though would require a script yeah?

Thanks for all your help Regi ^_^ appreciate it
 
Hmm... try a Parallel Common Event like this. I haven't tested it, but it might work.

Code:
@>Conditional Branch: Right Key is Pressed
  @>Set Move Route: Player
                     :$>Turn Right
  @>Set Move Route: Player [Repeat Action]
                     :$>Move Toward Player
  @>Conditional Branch: Variable 1 [Movement] >= 10
     @>Set Move Route: Player [Ignore if Can't Move]
                     :$>Move Right
    : Else
     @>Control Variables: [1: Movement] += 1
 : Else
  @>Control Variables: [1: Movement] = 0
  @>Set Move Route: Player
@>Wait: 1 frame

What this does, is turn the player right when you press right, and starts adding 1 to a variable each frame. It also prohibits the player from moving too early with the "Move Toward Player" command. When the variable reaches 10 (after 10 frames), the player starts moving. If you stop holding right, the variable goes down to 0.

Try repeating this for all directions. You can change the Conditional Branch variable value to something higher or lower than 10, depending on how long you want the player to wait before moving.

Good luck with it, Devro! :thumb:
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top