View Issue Details

IDProjectCategoryView StatusLast Update
0002769Spring engineUnit Scriptingpublic2012-01-10 00:10
ReporterKingRaptor Assigned Toabma  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionno change required 
Product Version84.0 
Summary0002769: Units created by gadget before gamestart do not function
DescriptionThe (LUS-scripted) PlanetWars buildings in ZK created before gamestart (during gadget:Initialize() ) behave as if they did not have scripts (no animation, unit not removed on death, etc.) /luarules reload fixes the problem.

Giving the same units with /cheat /give results in normal behavior.

Didn't test whether this also happens with COB scripts.
Additional InformationRun the attached Spring startscript (Zero-K v0.9). Compare buildings (e.g. pw_mine, pw_artefact) spawned by gadget before game start to those /given after game start.

Gadget in question: http://code.google.com/p/zero-k/source/browse/trunk/mods/zk/LuaRules/Gadgets/unit_planetwars.lua
TagsNo tags attached.
Attached Files
script_pwtest.txt (Attachment missing)
Checked infolog.txt for Errors

Relationships

related to 0002503 closedKloot (master) unit scripts does not work on startunits, works on units created later 
has duplicate 0002464 resolvedabma Any units given before game start in zero-k 0.8.7.2 are invisible 

Activities

user744

2011-11-25 15:35

  ~0007698

maybe this problem?
http://springrts.com/mantis/view.php?id=2503

Kloot

2011-11-26 16:00

developer   ~0007712

duplicate of 0002503

KingRaptor

2011-12-15 06:00

reporter   ~0007920

The gadget in question already had layer=1; changing to 2 or math.huge fails to resolve the issue.

jK

2011-12-15 09:19

developer   ~0007921

Last edited: 2011-12-15 09:21

The problem was/is that one of your gadgets is crashing, and the current (gadget-widget-) handlers aren't safe against crashes while processing an event. So it can happen that not all addons recv. the event when another (earlier) one crashes.

Note, here the event was/is UnitCreated.

abma

2012-01-10 00:10

administrator   ~0008117

please retry with a fixed lua script and reopen if it still fails...

/cheat
/give all works fine here when typed before game start (yes, you've to be quick... :)


please reopen, if it still fails.

Issue History

Date Modified Username Field Change
2011-11-25 14:22 KingRaptor New Issue
2011-11-25 14:22 KingRaptor File Added: script_pwtest.txt
2011-11-25 15:35 user744 Note Added: 0007698
2011-11-25 17:38 abma Relationship added related to 0002464
2011-11-25 17:38 abma Relationship added related to 0002503
2011-11-26 16:00 Kloot Note Added: 0007712
2011-11-26 16:00 Kloot Status new => closed
2011-11-26 16:00 Kloot Resolution open => duplicate
2011-12-15 06:00 KingRaptor Note Added: 0007920
2011-12-15 06:00 KingRaptor Status closed => feedback
2011-12-15 06:00 KingRaptor Resolution duplicate => reopened
2011-12-15 09:19 jK Note Added: 0007921
2011-12-15 09:20 jK Note Edited: 0007921
2011-12-15 09:21 jK Note Edited: 0007921
2012-01-10 00:10 abma Note Added: 0008117
2012-01-10 00:10 abma Status feedback => resolved
2012-01-10 00:10 abma Resolution reopened => no change required
2012-01-10 00:10 abma Assigned To => abma
2012-01-10 00:12 abma Relationship replaced has duplicate 0002464