Grand Posted February 12, 2016 Posted February 12, 2016 (edited) I'm not sure what I'm missing here but I'm getting an error.. I have group called Tank_Group_1 with just one unit in it, unit name: Tank_1. When that tank is killed, I want it to respawn so I'm doing: Type: CONTINUOUS ACTION (Trigger12345, NO EVENT) Condition: UNIT DEAD (Tank_1) Actions: DO SCRIPT (mist.respawnGroup('Tank_Group_1') Error message: [string "mist.respawnGroup('Tank_Group_1')"]:1: attempt to index global 'mist' (a nil value) Edited February 12, 2016 by Grand
ajax Posted February 12, 2016 Posted February 12, 2016 That error message looks like you haven't loaded the main Mist script yet. I think I read somewhere that if you are trying to load it using a "mission start" trigger, it won't work because of a current bug. It could also be that the mission, as it is starting up, sees the unit as dead and tries to respawn it before Mist is loaded. Maybe insert a "time more" > 5 seconds as an additional condition to your trigger?
Stonehouse Posted February 13, 2016 Posted February 13, 2016 Under 1.5 latest patch I have no trouble using Mist on a mission start trigger. Perhaps just a 2.0 error or it's been fixed along the way?
ajax Posted February 13, 2016 Posted February 13, 2016 That's good to know, Stonehouse. Thanks! I've been wondering if that bug had been fixed.
Recommended Posts