Author Topic: Unable to trigger unitAttacking event  (Read 1123 times)

Empyre

  • Guest
Unable to trigger unitAttacking event
« on: 28 April 2013, 07:44:01 »
Hi,

I'm not sure whether I'm using the <unitAttacking> event incorrectly, but I have been unable to get it to trigger with any of the included MG scenarios I tried. As per the wiki, it should trigger when any unit attacks another unit. As a test, I'm putting a simple addConsoleText code (which works perfectly fine elsewhere) in the Amazones scenario file like so:

Code: [Select]
<unitAttacking>
  addConsoleText('Attacking')
</unitAttacking>

My interest in this event is to try create a rudimentary cost system for attacking units. Currently, Glest engines only have an EP cost for attacks but it would be very useful if there was an optional system whereby attacks cost a certain number of one or more resources.

Also, if I may suggest: it would also be very useful for modders to have a sample scenario file that has a worked example of each of the available events.

filux

  • MegaGlest Team
  • Draco Rider
  • ********
  • Posts: 310
  • was OpenSuse x64, is Debian testing x64
    • View Profile
Re: Unable to trigger unitAttacking event
« Reply #1 on: 28 April 2013, 08:25:58 »
... Also, if I may suggest: it would also be very useful for modders to have a sample scenario file that has a worked example of each of the available events.
I suggest you to look closely the "Lord of the Land" scenario/campaign from the mods' center (ingame menu).  :)
« Last Edit: 28 April 2013, 09:14:24 by filux »

 

anything