Platform Builder Forums
Help and Support => Working with Platform Builder => Topic started by: Saoirse 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?
-
In the character setup,
(https://i.ibb.co/2N1Y194/image.png) (https://imgbb.com/)
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.
-
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)
(https://i.ibb.co/Rgywm5T/character-setup.png) (https://imgbb.com/)
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
(https://i.ibb.co/H4P3Xrq/custom-enemy.png) (https://imgbb.com/)
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.
-
Whoops. I forgot about the enemy firing back. Sorry! Good job explaining saiwong!
-
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.
-
Maybe you should use a command prompt to change fire direction when pressing up or down keys?
-
I'll check all this out, thanks for the advice!
One more question: Is it possible to customise the player HUD?
-
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 (https://theplatformbuilder.com/Command-Prompt/#HUDcontrols)
-
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
-
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.
-
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.