Author Topic: [fixed] r3192: Savegames: (Some?) Lua events are no longer triggered  (Read 883 times)

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
On r3129, with the Amazones scenario saved during the first attack wave, when you restore this scenario from a savegame state, the following waves never take place - even though you still get a message about the next wave starting there are no more attacks.
Correctly, once you have killed the last attacking unit which is part of an ongoing attack wave, the next wave should be spawned, and new units should be generated and be heading towards your castle.
« Last Edit: 30 March 2012, 02:27:06 by tomreyn »
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: r3192: Savegames: (Some?) Lua events are no longer triggered
« Reply #1 on: 29 March 2012, 23:41:13 »
Issues are fixed now related to Amazones (And Amazones_light).

Any scenario using functions define in startup need to move them into a new XML section that MEgaglest supports called:

Code: [Select]
<global>
</global>
For Example:

     
Code: [Select]
          <global>
        -- global vars
        isSent=0

function addAttackingEnemy(value)
enemyCount=enemyCount+1
createUnit(value, 1, startLocation(1))
enemies[#enemies+1]=lastCreatedUnit()
givePositionCommand(lastCreatedUnit(), 'attack',startLocation(0))
end

  function sendFlyingUnits()
isSent=1
                        for i=1, 3 do
addAttackingEnemy('flyingvalkyrie')
end
end
                </global>


tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Re: r3192: Savegames: (Some?) Lua events are no longer triggered
« Reply #2 on: 30 March 2012, 00:06:14 »
Thanks. For some reason, this does not fix it for this savegame (screenshot), yet, though. Could you take a look at it, please?
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: r3192: Savegames: (Some?) Lua events are no longer triggered
« Reply #3 on: 30 March 2012, 01:58:49 »
Ok svn should fix this (Was saving strings wrong)

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Re: r3192: Savegames: (Some?) Lua events are no longer triggered
« Reply #4 on: 30 March 2012, 02:26:53 »
That's confirmed, thanks!
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

 

anything