this objects throws the error invalid variable scope in object definition.
See any problems with this?
Main.iss
HealVariables.iss
HealObjects.iss
See any problems with this?
Main.iss
Code:
#include "${LavishScript.CurrentDirectory}/scripts/HealVariables.iss"
#include "${LavishScript.CurrentDirectory}/scripts/HealObjects.iss"
Code:
variable(global) bool hgrp[24]
variable(global) int bhpctgrp[24]
variable(global) int hpctgrp[24]
variable(global) int fhpctgrp[24]
Code:
; objects used to declare Combat States of the char and the group
objectdef Healstate
{
member:int grpbgint()
{
variable int icnt = 1
variable int injuredint = 0
do
{
if ${hgrp[${icnt}]} && ${Group[${icnt}].Health} < ${bhpctgrp[${icnt}]}
injuredint:Inc
}
while ${icnt:Inc} <= ${Group.Count}
return ${injuredint}
}
member:int grpsmint()
{
variable int icnt = 1
variable int injuredint = 0
do
{
if ${hgrp[${icnt}]} && ${Group[${icnt}].Health} < ${hpctgrp[${icnt}]}
injuredint:Inc
}
while ${icnt:Inc} <= ${Group.Count}
return ${injuredint}
}
member:int grpfastint()
{
variable int icnt = 1
variable int injuredint = 0
do
{
if ${hgrp[${icnt}]} && ${Group[${icnt}].Health} < ${fhpctgrp[${icnt}]}
injuredint:Inc
}
while ${icnt:Inc} <= ${Group.Count}
return ${injuredint}
}
}
; Set Variables needed to call the objects format variable nameofobject nameofvariable
variable(global) Healstate Healstate
Last edited: