/*
LAYERS:
MOB_LAYER+10 Background
MOB_LAYER+11 Enemies
MOB_LAYER+12 Players
MOB_LAYER+13 Effects
MOB_LAYER+14 HUDbackground
MOB_LAYER+15 HUDtext
*/
obj/HUD
battleBG
icon = 'images/battle/background/Cave.jpg'
layer = MOB_LAYER+10
screen_loc = "8,14:16"
battlePARTICIPANTS
layer = MOB_LAYER+11
battleFX
layer = MOB_LAYER+13
battleHUD
layer = MOB_LAYER+14
battlestatsHUD
icon = 'images/battle/HUD/battlestatshud.png'
screen_loc = "8,22"
battlemenuHUD
icon = 'images/battle/HUD/battlemenuhud.png'
screen_loc = "8,12"
battlepriorityHUD
icon ='images/battle/HUD/battlepriorityhud.png'
screen_loc = "8,13:8"
battleTEXT
layer = MOB_LAYER+15
battlestatsTEXT
battlemenuTEXT
battlepriorityTEXT
battleFRAME
layer = MOB_LAYER+16
battlestatsFRAME
icon = 'images/battle/HUD/battlestatsframe.png'
screen_loc = "8,22"
battlemenuFRAME
icon = 'images/battle/HUD/battlemenuframe.png'
screen_loc = "8,12"
battlepriorityFRAME
icon ='images/battle/HUD/battlepriorityframe.png'
screen_loc = "8,13:8"
var/obj/HUD/battleBG = new()
mob/var/obj/HUD/battleBG/battleBG
//Character's stats in fight
var/obj/HUD/battlestatsHUD/battlestatsHUD
var/obj/HUD/battleFRAME/battlestatsFRAME
mob/var/obj/HUD/battleHUD/battlestatsHUD/battlestatsHUD
mob/var/obj/HUD/battleFRAME/battlestatsFRAME/battlestatsFRAME
//Order in which each mob attacks
var/obj/HUD/battleHUD/battlepriorityHUD
var/obj/HUD/battleFRAME/battlepriorityFRAME
mob/var/obj/HUD/battleHUD/battlepriorityHUD/battlepriorityHUD
mob/var/obj/HUD/battleFRAME/battlepriorityFRAME/battlepriorityFRAME
//Battle selection menu
var/obj/HUD/battleHUD/battlemenuHUD
var/obj/HUD/battleFRAME/battlemenuFRAME
mob/var/obj/HUD/battleHUD/battlemenuHUD/battlemenuHUD
mob/var/obj/HUD/battleFRAME/battlemenuFRAME/battlemenuFRAME
mob/var/tmp/inbattle = 0
mob
//Commands only here for testing purposes
verb/Fight()
createbattlehud()
verb/Endfight()
removebattlehud()
proc/createbattlehud()
if(inbattle==0)
inbattle=1
src.battleBG=new
src.client.screen+=battleBG
//Character's stats in fight
src.battlestatsHUD=new
src.battlestatsFRAME=new
src.client.screen+=battlestatsHUD
src.client.screen+=battlestatsFRAME
//Order in which each mob attacks
src.battlepriorityHUD=new
src.battlepriorityFRAME=new
src.client.screen+=battlepriorityHUD
src.client.screen+=battlepriorityFRAME
//Battle selection menu
src.battlemenuHUD=new
src.battlemenuFRAME=new
src.client.screen+=battlemenuHUD
src.client.screen+=battlemenuFRAME
proc/removebattlehud()
if(inbattle==1)
inbattle=0
src.client.screen-=battleBG
src.client.screen-=battlestatsHUD
src.client.screen-=battlestatsFRAME
src.client.screen-=battlepriorityHUD
src.client.screen-=battlepriorityFRAME
src.client.screen-=battlemenuHUD
src.client.screen-=battlemenuFRAME
verb/rotatestuff()
//will be needed for different view angles, each time changing to a quarter of the battleBG icon
battleBG.icon.Shift(EAST,20,1)
Problem description:
Shift doesn't work somehow. I don't know how I can make it work, since I want to have a battle background image that loops around and I can turn around. For some reason, it sees Shift not as a built-in proc but expects a defined proc to run. The manual doesn't give me any examples and I don't really know if I messed up the syntax or something.
I get these error messages:
loading Training.dme
loading interface.dmf
fightsystem.dm:124:error: battleBG.icon.Shift: undefined proc
Training.dmb - 1 error, 0 warnings (12/31/16 5:24 pm)
Besides, happy new year, everyone.
Shift() isn't a part of the default BYOND setup.