The title says all, this is my macros.gml script:
enum ia_combat //Current state of the IA { neutral, //default behaviour suspicious, //when hears a suspicious sound, go investigate alert, //hears an alarming sound, warns nearby teammates fighting //engaged combat, with player, shooting warns teammates }
When I atempt to use the macro on the Enemy's Begin step, this happens:
[live][16:56:46] Runtime error: obj_enemy_simple:Step_1[L34,c11] `100274` (obj_enemy_simple) does not have a variable `ia_combat`
Even tho it works perfectly when not using live_result() on Begin Step;
System information:
Windows 8.1 Pro 64-bits.
GMS2 IDE: v2.1.3.189
Please, feel free to contact me via Twitter if necessary, it's the easiest way to reach me: @ThiagoJaqueta
EDIT: Odly, this only happens at this specific situation, I'm trying to find out what is causing this, but when I do this at the draw event, it works perfectly.
var combat_str=""; switch(ia_combat_state) { case ia_combat.neutral: combat_str="Neutral"; break; case ia_combat.suspicious: combat_str="Suspicious"; break; case ia_combat.alert: combat_str="Alert"; break; case ia_combat.fighting: combat_str="Fighting"; break; } draw_set_halign(fa_center); draw_set_valign(fa_bottom); draw_set_font(fnt_consolas); draw_text(x1,y2-12,combat_str);