MetalES / Project-Zelda

Project Zelda, made using Solarus
12 stars 1 forks source link

Rework the entity database #55

Closed MetalES closed 7 years ago

MetalES commented 7 years ago

Despite the fact that the entity database got reworked, some codes for entities are from early versions of the game and might be outdated with the current version of the engine (some code aren't updated, the minecart is unchanged since the alpha 0.1 and still use set_tunic_sprite_id()).

For example, the Guard use 3 scripts (normal guard, chasing guard and it's detection field graphic), normal guard and chasing guard can be merged, and now, as I mastered a bit the engine, the destination id for guards should be managed through the map script (entity:set_caught_dest_id()), the current code redirrect Link into an unexisting test map.

Code was untouched since 2015 and used very primitive way to work (storing equipment, freeze the hero, game value to check if the minecart is active, global variable, etc :-> https://youtu.be/99qQJfXXVjI?t=2m14s), it is now updated and cleaned

What remain to do on the minecart ?

EDIT: Guard system is linked to the npc metatable now, the only custom entity is the detection field

Todo: add entity:set_path({path}) so the platfform can be configured through script call add entity:set_waiting_time(time) to control how much time the platform stays until it restarts add entity:set_speed() to well you know