Author Topic: Enemy = Continue moving  (Read 607 times)

Antikore

  • Developing Mortal Theater at day, developing depression at night.
  • Level 22: Trex
  • *
  • Posts: 2020
  • Enjoying Platform Builder from the very start
    • View Profile
    • PBuilder Resources
Enemy = Continue moving
« on: March 21, 2021, 12:03:49 PM »
Command that makes the enemy return its normal movements while also keeping the current movement, the normal command just returns to move the enemy normally.

This will be useful for enemies that should move diagonally and bounce off walls, to choose the direction randomly by commands, for example:
Code: [Select]
local var dir = random 3
if dir = 0
enemy = up left
if dir = 1
enemy = down left
if dir = 2
enemy = up right
if dir = 3
enemy = down right
enemy = continue moving //This will make the enemy continue moving in that direction, but when colliding a wall, if its made to reverse at walls, it will reverse.
« Last Edit: March 21, 2021, 12:04:16 PM by Antikore »
Sorry because my English is not very good because I'm Spanish ;) :P