Creating a BASIC World Map and/or Stage Select screen.

So, thats my system for removing location markers from map... it runs in idle animation of marker thats visible on map
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
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
 
Any way are acceptable here. It depends on how markers are unlocked in game

In D&D : Rise of Warduke, markers are unlocked by order so players have to play in certain order to unlock final marker or final level. One (or two) global variable is used to unlock a marker and there's another variable used to lock that marker again

If your levels are unlocked not by order or by number of cleared other levels, then yes, a counter stored in global variable would suit better :)
 
Back
Top Bottom