Author Topic: Special conditional  (Read 1171 times)

CGM

  • Christian, 3D artist, former Platform Builder gamdev
  • Master Builder
  • *
  • Posts: 3836
    • View Profile
Special conditional
« on: October 08, 2018, 10:13:50 PM »
A special conditional like this would be helpful:
if projectile (ID) hits enemy (ID){change enemy (ID)=block (ID)}
I would do this with projectile target impact settings, but it changes all enemies in view to a block. I can't have that...



TingThing

  • Admin and Developer
  • Level 20: Nobom
  • *
  • Posts: 1395
  • Creator and Developer of Platform Builder
    • View Profile
    • Platform Builder Home
Re: Special conditional
« Reply #1 on: October 08, 2018, 10:23:24 PM »
Your proposed "change enemy (ID)=block (ID)" Would give you the same problem you are already having. Every enemy of the ID would change into the block, not just the one that was struck by the projectile.


The only way around this is to have about 10-20 copies of the same enemy, and store them all into a folder. Since each one would have its own unique enemy ID, you could change the enemy to a block in the command prompt with the enemy's defeat settings. That way you could have 10 enemies in a room, all with their own unique enemy ID. You may want to increase their defense and increase the projectile attack power so that only the projectile can kill them.






CGM

  • Christian, 3D artist, former Platform Builder gamdev
  • Master Builder
  • *
  • Posts: 3836
    • View Profile
Re: Special conditional
« Reply #2 on: October 08, 2018, 10:29:42 PM »
Even that would create conflict. Because the enemies are supposed to be killed either by being jumped on, or shot with this projectile. If jumped on, they go into a brown cloud that disappears. If I were to shoot it with the projectile, it would change to a block. So, basically, I want the projectile to only do it to the enemy that it hits.