So, thats my system for removing location markers from map... it runs in idle animation of marker thats visible on map
It checks status(globalvar) if globalvar is 1 ( its switched to 1 after boss is defeated on stage) then it removes marker from map in spawn animation.
I want to unlock final level after all stages are cleared from map and one marker to appear, so...
The simplest way to unlock and show final level on map after all stages are cleared is to create global variable in spawn and count backwards by updating globalvar with current value -1 until its 0 then stop removing final level marker from map in spawn anim ? Or am i making it too complicated?
I think counting up would be better...
----
Ok did it with upping variable by 1 each time level is beaten so after about 20 it stops killing last stage so it can appear on map, works nicely and you can actually easily enable new levels on map after 5 stages are beaten then more after you beat 10 etc...
Moonstone
https://drive.google.com/file/d/1hURkRWWin28uT-ooa8G9Ypw5y2rK-9uz/view?usp=sharing
Code:
@script
void self = getlocalvar("self"); //Get calling entity
char Name = getentityproperty(self,"name");
void Status = getglobalvar(Name);
int HP = getentityproperty(self,"health");
if (( HP == 2 )&&(frame == 1)){
changeentityproperty(self, "animation", openborconstant("ANI_FOLLOW1"));
}
if (( HP == 3 )&&(frame == 1)){
changeentityproperty(self, "animation", openborconstant("ANI_FOLLOW3"));
}
if (( HP == 5 )&&(frame == 1)){
changeentityproperty(self, "animation", openborconstant("ANI_FOLLOW5"));
}
if(Status == 1){
killentity(self);
}
@end_script
I want to unlock final level after all stages are cleared from map and one marker to appear, so...
The simplest way to unlock and show final level on map after all stages are cleared is to create global variable in spawn and count backwards by updating globalvar with current value -1 until its 0 then stop removing final level marker from map in spawn anim ? Or am i making it too complicated?
I think counting up would be better...
----
Ok did it with upping variable by 1 each time level is beaten so after about 20 it stops killing last stage so it can appear on map, works nicely and you can actually easily enable new levels on map after 5 stages are beaten then more after you beat 10 etc...
Moonstone
https://drive.google.com/file/d/1hURkRWWin28uT-ooa8G9Ypw5y2rK-9uz/view?usp=sharing