If you should strike me down…

If you should strike me down…



don’t eat the yellow tile.

So, I just added a global entity colission trigger to verge 3. If you set the global string trigger.onEntityCollide equal to a vc function, whenever an entity runs into an obstruction that function will be called.

It sets the following variables:

  • event.tx and event.ty are the tile coodinates hit.
  • event.entity is the entity who did the hitting.
  • event.zone is the zone of the tile being struck, as long as it was a tile obstruction being hit. Otherwise, -1.
  • event.entity_hit is entity index of the entity being hit, as long as it was an entity-on-entity collision. Otherwise, -1.

    This facilitates pushing entities around, and zelda-like tool use, and entities reacting to their environment in general. Basically everything that people generally hijack verge’s native movement system for. So, yeah.

    This feature is as of r244 of http://www.verge-rpg.com/svn/verge3/. I haven’t fully announced it yet as I’m sure there are bugs and “bugs” in here (for instance, NPCs don’t collide with the player yet because that was apparently never permitted in the first place?). However, I really would like some feedback since this is a feature that lets everyone stop hijacking control from verge and gives the power back to the people. Or stuff.

    Download the demo here!

  • Also read...

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>