Author Topic: Enemy Commands in Platform Builder 6.4  (Read 440 times)

TingThing

  • Admin and Developer
  • Level 15: Spreker
  • *
  • Posts: 526
  • Creator and Developer of Platform Builder
    • View Profile
    • Platform Builder Home
Enemy Commands in Platform Builder 6.4
« on: December 22, 2018, 04:58:48 AM »
Hi everyone! Platform Builder 6.4 is out! There are major improvements for the overworld editor, plus several other important changes. You can view them all here.

There are not many new commands, except for keyboard conditionals which are talked about on this page. However, I want to explain a new way that certain commands work for enemies.


Here's the thing: If an enemy command uses an enemy ID, it will apply to all enemies with that ID in the view and nearby. If an enemy command is used without an enemy ID and it is being called from an enemy or (in some situations) from a projectile, it will apply only to the enemy that called it.



This may sound a bit confusing. Allow me to explain in more detail...


Typically, commands that deal with enemies will modify every custom enemy that is visible in the view (and nearby) of the given ID. For instance, if you have 5 of the same custom enemies in the view, each with an ID of 3, and you run the command "change enemy 3, 4" it will change all five of those enemies to enemies with an ID of 4.

These kinds of commands which modify enemies may behave differently, depending how you run them. In special occasions, you will be able to remove the enemy ID from the command in order to get different results. For instance...


"kill enemy 3" becomes "kill enemy"
"enemy 5 = item 2" becomes "enemy = item 2"
"change enemy 3, 4" becomes "change enemy 4"
"enemy 4 = jump" becomes "enemy = jump"

In all of these examples, the Enemy ID is removed. If you remove the enemy ID from your command, Platform Builder will check if this command is coming from a custom enemy. If it is, then the command will apply just to that one custom enemy. A command comes from a custom enemy if it was written in a custom enemy command prompt.

 


Does this make sense? Enemy IDs are no longer required for commands being run by enemies. If you try doing this in the area settings startup command (for instance), Platform Builder will have no idea which enemy it is supposed to modify. But if you do this in an enemy command prompt, there shouldn't be a problem.


This can also work in the first two projectile command prompts. If an enemy fires a projectile, and the projectile has commands for when it is fired, the commands no longer need an enemy ID. Similarly, if a custom projectile strikes a custom enemy, and the projectile has commands for when it strikes a target, you don't need the enemy ID anymore. By leaving that out, the enemy commands will apply only to the enemy that was struck.





Hopefully this all made sense. Feel free to write if you have any questions.


Best,
TingThing
« Last Edit: December 22, 2018, 05:11:45 AM by TingThing »

Alley

  • The Blue Leader
  • Level 14: Grooper
  • *
  • Posts: 496
  • Deals with art in PC and acting and drawing
    • View Profile
    • Team Alju5
Re: Enemy Commands in Platform Builder 6.4
« Reply #1 on: December 22, 2018, 11:13:33 PM »
Its here. And you actually also took my suggestion to allow levels before the worlds. Not only but you did some work also to include some Intro scene before a title. O:-)
Now there are enough features to build very good game including animated scenes to the end and to the beginning how ever we would like to do it. Splash screen is a bit limited because of no way to include commands, timelines and because of automatic fading away but it is worth now to fill every part of mentioned and PB really allows make it look all fully complete.

Awesome!  ^-^ New elements for the worlds like enemies, houses, hidden path and even extra sheets. You have chosen to improve things that really needs it at most currently.
« Last Edit: December 22, 2018, 11:15:36 PM by Alley »
Alley (T_Alj5)

Christian Game Maker

  • Currently developing Project ASM (The Adventures Of Super Mike) And manager of platformbuilderfansite.weebly.com!
  • Level 21: Magmus
  • *
  • Posts: 1949
  • The way of the Cross leads home.
    • View Profile
    • The Adventures of Super Mike Website (ASM)
Re: Enemy Commands in Platform Builder 6.4
« Reply #2 on: December 24, 2018, 01:37:10 AM »
WOW! You took my suggestion! Now I can resume development in a certain power-up in my game! Thanks a bunch! This'll also help a lot in other areas! Go Ting!
Christian Game Maker: 3:16 Numbers Of Hope

Antikore

  • YouTuber, Gamer and the developer of Castle Chamber.
  • Level 18: Statix
  • *
  • Posts: 883
  • Enjoying Platform Builder from the very start
    • View Profile
    • PBuilder Resources
Re: Enemy Commands in Platform Builder 6.4
« Reply #3 on: December 27, 2018, 10:18:24 PM »
I'm doing a little walk through the forums again. Very good new features, but I will suggest something fast. Maybe will be cool a placeholder/expression that will be "[collided object]" This will return in the command prompt of the strike projectile which thing was collided. An enemy, player or a block, and in case of an enemy and a block "[collided object id]" will return the number of the ID of that object.

Will be good for doing something like this

Code: [Select]
if collided object is enemy & collided object id = 5
{
_NOOOOOO you killed a cow! That cow was my favorite
}

Just that, I will now return to my night activities.
Sorry because my English is not very good because I'm Spanish ;) :P
==================================
My games:
- Castle Chamber (In development)
==================================
YouTube Channel: https://www.youtube.com/channel/UC4bftKRMy_deGspyejBWjFQ

Christian Game Maker

  • Currently developing Project ASM (The Adventures Of Super Mike) And manager of platformbuilderfansite.weebly.com!
  • Level 21: Magmus
  • *
  • Posts: 1949
  • The way of the Cross leads home.
    • View Profile
    • The Adventures of Super Mike Website (ASM)
Re: Enemy Commands in Platform Builder 6.4
« Reply #4 on: December 28, 2018, 08:59:32 AM »
That's just what I need!
Christian Game Maker: 3:16 Numbers Of Hope