Author Topic: Two quick questions...  (Read 2603 times)

Saoirse

  • Level 1: Bizz
  • *
  • Posts: 5
  • I'm here to figure out how to make games in PB!
    • View Profile
Two quick questions...
« on: December 20, 2019, 02:11:23 PM »
1. How do I make the player fire diagonally?

2. How do I make enemies shoot back and give them AI that's more advanced than just walking right towards the player all the time?
« Last Edit: December 20, 2019, 02:12:27 PM by Saoirse »

CGM

  • Christian, 3D artist, former Platform Builder gamdev
  • Master Builder
  • *
  • Posts: 3836
    • View Profile
Re: Two quick questions...
« Reply #1 on: December 20, 2019, 05:45:55 PM »
In the character setup,


you have different options.

As for Enemy AI, this is one of PB's weaknesses. I have suggested recently adding AI that we could program ourselves. Simply adding conditionals to check enemy movements, and check to see how far away they are from different objects and such. So there isn't much to work with to make good AI. We have very limited commands on enemies. I suggest we let TingThing know this is something we want. He told me he's more likely to add something if the community really wants it. So I suggest we open up a poll to see what the community wants.

saiwong3268

  • Level 6: Milder
  • *
  • Posts: 119
    • View Profile
Re: Two quick questions...
« Reply #2 on: December 20, 2019, 06:06:32 PM »
I have also been trying to find the answers to these and spent a day working it out.

I created a custom projectile and called it Projectile1

I then went via workstation screen:  Menu -> Character Setup

I enabled Stand Attack and Move Attack and made their Style = Ranged

There is a Projectile setting in middle of screen. Choose your custom projectile
(for me this was Projectile 1) and you can setup firing direction there.

Also for player to fire custom use attack key (i.e. Alt key and not Use Item key)






To make enemy fire back. I created a custom enemy and set its Primary Projectile to my custom one.
as you can see from the picture to can also setup the enemy firing direction





With regard to making enemy AI movements. You can set them to move in specific move patterns
using ARROW controls (near bottom left of workstation icons,  looks like large pink arrow)
You can also use ARROW controls for Platforms. Best look at the "Example file" which uses the
ARROW control to understand how to use it.

Hope this helps

p.s. note: I have only found the brown flappy bird and the flea type enemies can be controlled
by ARROW controls. Other enemies don't seem to be affected.
« Last Edit: December 20, 2019, 06:27:00 PM by saiwong3268 »

CGM

  • Christian, 3D artist, former Platform Builder gamdev
  • Master Builder
  • *
  • Posts: 3836
    • View Profile
Re: Two quick questions...
« Reply #3 on: December 20, 2019, 06:12:31 PM »
Whoops. I forgot about the enemy firing back. Sorry! Good job explaining saiwong!

CGM

  • Christian, 3D artist, former Platform Builder gamdev
  • Master Builder
  • *
  • Posts: 3836
    • View Profile
Re: Two quick questions...
« Reply #4 on: December 20, 2019, 06:24:19 PM »
Oh, and about the AI movements which Saiwong explained, that actually isn't AI. That is programming a pre-set path. AI is where the computer computes the enemy's next movements depending on variables that have been set up. We have hardly any control of this. But that's one option. Another option is to put commands inside of the command prompts of the enemy settings.

War

  • "The top player is here!"
  • Level 20: Nobom
  • *
  • Posts: 1490
    • View Profile
    • My website
Re: Two quick questions...
« Reply #5 on: December 21, 2019, 07:02:21 PM »
Maybe you should use a command prompt to change fire direction when pressing up or down keys?
Hey, wassup wassup? My name is Warrior555MainsGanon (but just call me War) and I'm the main guy behind Megaman Zero Online and the upcoming Matt's Adventure! I don't speak often here but I'm a very friendly lad so if you wanna talk, don't hesitate!

Saoirse

  • Level 1: Bizz
  • *
  • Posts: 5
  • I'm here to figure out how to make games in PB!
    • View Profile
Re: Two quick questions...
« Reply #6 on: December 22, 2019, 12:56:23 AM »
I'll check all this out, thanks for the advice!

One more question: Is it possible to customise the player HUD?

TingThing

  • Admin and Developer
  • Level 20: Nobom
  • *
  • Posts: 1395
  • Creator and Developer of Platform Builder
    • View Profile
    • Platform Builder Home
Re: Two quick questions...
« Reply #7 on: December 22, 2019, 03:47:20 AM »
It is possible to customize the HUD, although the entire process has to be done with commands. You can learn about HUD commands here: https://theplatformbuilder.com/Command-Prompt/#HUDcontrols




War

  • "The top player is here!"
  • Level 20: Nobom
  • *
  • Posts: 1490
    • View Profile
    • My website
Re: Two quick questions...
« Reply #8 on: December 22, 2019, 12:55:21 PM »
I'll check all this out, thanks for the advice!

One more question: Is it possible to customise the player HUD?
We can do this since 7.0.0 but you have to use commands
Hey, wassup wassup? My name is Warrior555MainsGanon (but just call me War) and I'm the main guy behind Megaman Zero Online and the upcoming Matt's Adventure! I don't speak often here but I'm a very friendly lad so if you wanna talk, don't hesitate!

CGM

  • Christian, 3D artist, former Platform Builder gamdev
  • Master Builder
  • *
  • Posts: 3836
    • View Profile
Re: Two quick questions...
« Reply #9 on: December 22, 2019, 10:15:57 PM »
TingThing, that hud editor is really not an extrordinary feature. I want to have a hud manager in game setup that isn't controlled by commands only. Please release a proper HUD editor.

Gizgord

  • average
  • Level 18: Statix
  • *
  • Posts: 835
    • View Profile
Re: Two quick questions...
« Reply #10 on: December 22, 2019, 10:44:14 PM »
you can choose what thing to display, where it is placed and how it looks (with your own sprites). I think that does the job.