Author Topic: Making Portals Unusable After Defeating The Area  (Read 1222 times)

GalacticHooloovoo

  • Wannabe
  • Posts: 11
  • OS:
  • Windows 8.1/Server 2013 Windows 8.1/Server 2013
  • Browser:
  • Chrome 45.0.2454.85 Chrome 45.0.2454.85
    • View Profile
  • Playstyle: Keyboard
Making Portals Unusable After Defeating The Area
« on: September 06, 2015, 02:03:01 PM »
Hello!

I've been trying to make it so that there are multiple selectable areas which can be chosen at the player's decision, and once the area is defeated, having the player be returned back to the screen with the multiple portals, and having the area be unable to be returned to. Also, I would like it so that once all of the portals are defeated, another portal appears that wasn't there before. As someone with little GameMaker experience, I cannot figure it out.

Can someone help me with how to do this?

Thanks!

Also, I am using the Yuuutu engine.

lawatson

  • The Kid
  • Posts: 331
  • I do things and I make things.
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 45.0.2454.85 Chrome 45.0.2454.85
    • View Profile
  • Playstyle: Keyboard
Re: Making Portals Unusable After Defeating The Area
« Reply #1 on: September 06, 2015, 02:22:23 PM »
You can use the global.boss[index] or global.item[index] variables to do that. You don't have to make a pickup or a boss either, you can simply just trigger it secretly after beating the area.
You can do it like so:

global.item[0]=1;

Simple as that. To make portals disappear and appear when you enter the warp room, you can basically do something like:

if global.item[0]==1{
    instance_destroy();
}

Put it in the creation code of the portal, not the create event (The one in the object maker). And if you want to make a portal appear when you have all the items, what you need to do is something like:

if global.item[0]==1 && global.item[1]==1 && global.item[2] ==1 ...{
    a=instance_create(position,position,warp);
    a.roomTo=finalArea;
}

Simple as that. I hope this helps!
(click to show/hide)

smoke weed everyday