Author Topic: [XP] Do any Scripts that you know of check Names of Enemies?  (Read 354 times)

Offline Heretic86

  • Astral Trancist
  • *****
  • Posts: 727
  • LV: 29
    • View Profile
[XP] Do any Scripts that you know of check Names of Enemies?
« on: August 29, 2016, 04:04:43 PM »
Since Enemies dont really have any place except a Config to add parameters, Im just curious if any scripts you know of rely on checking the Name for special properties?

For example:
Ghost - Ghost\property[val]

Trouble is with this method:

Code: [Select]
  #--------------------------------------------------------------------------
  # * Get Name
  #--------------------------------------------------------------------------
  def name
    return $data_enemies[@enemy_id].name
  end

I already have a work around, assigning @name during init, but fear it may cause some conflicts with other scripts, so just curious...

(got bored, wanted floating enemies to have a floating animation... :p )
Current Scripts:
Heretic's Moving Platforms

Current Demos:
Collection of Art and 100% Compatible Scripts

(Script Demos are all still available in the Collection link above.  I lost some individual demos due to a server crash.)

Offline KK20

  • Master Scripter Fixer
  • Global Moderator
  • Lexima Warrior
  • ****
  • Posts: 2954
  • LV: 368
  • Gender: Male
  • Bringer of Salt
    • View Profile
Re: [XP] Do any Scripts that you know of check Names of Enemies?
« Reply #1 on: August 29, 2016, 05:07:03 PM »
You can just make a new method or overload name with a parameter to return the full name of the enemy while leaving the default to return just the name itself.

Also how is this going to be any different from G_G script? Why not just make an update to that instead.



(click to show/hide)
NNID: KK20-CP

Offline G_G

  • Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 6585
  • LV: 407
  • Gender: Male
    • View Profile

Offline Heretic86

  • Astral Trancist
  • *****
  • Posts: 727
  • LV: 29
    • View Profile
Re: [XP] Do any Scripts that you know of check Names of Enemies?
« Reply #3 on: August 29, 2016, 11:12:19 PM »
http://forum.chaos-project.com/index.php/topic,10113.msg165713.html#msg165713

I didnt even know about that script!

Ok, so I read thru his code and see the differences.  That is probably a better script for a couple of reasons:

#1 - It doesnt mess with def name
#2 - It doesnt mess with screen_x, y, or z
#3 - It enhances Battle Logic

I was just going after Floating Enemies for Animation purposes but didnt do anything to the Battle Mechanics.  Only thing I may have done a bit better was to use Trig instead of Linear Floats, but its such a minor thing, I doubt anyone would really care.

Oh well, I was having fun putting it together just to play around with Battler Sprites.  I think there are so few people that use XP anyway that it may not be worth while even releasing, especially when there are more than sufficient scripts already in existence.
Current Scripts:
Heretic's Moving Platforms

Current Demos:
Collection of Art and 100% Compatible Scripts

(Script Demos are all still available in the Collection link above.  I lost some individual demos due to a server crash.)