How do I make a Star Coin Barrier in the World Map?

Description: Subforum dedicated to SMBX-38A - a fan-made remake of the original SMBX Engine, made by 5438A38A.
Forum rules: This is official Europan/American community for the SMBX-38A. Suggested to don't post stuff for this engine outside this subforum.
Moderators: Lx Xzit, Yoshi021, 5438A38A, Semi-moderatos, Moderators

TepigFan101 M
Topic author, Duke
Duke
Avatar
TepigFan101 M
Topic author, Duke
Duke
Age: 22
Reputation: 29
Posts: 110
Joined: 12 Aug 2016

Post #1by TepigFan101 » 30 Oct 2016, 10:38

How can I make it so that I need a certain amount of star coins to enter a certain part of the world map? I need this, because its essential to my project.....does anyone know how?
Current Project : SMTFA
Coming Soon: NSMB DS Remake

I'm a nice and cheerful guy, so give me a holler if you need something! :gamer:

Discord:https://discord.gg/3HKcnFJ
Come to my discord to learn more about my stuff!

TheGreatMarioPerson
Count
Count
Avatar
TheGreatMarioPerson
Count
Count
Age: 19
Reputation: 3
Posts: 283
Joined: 3 Jul 2016
Location: Mushroom Kingdom

Post #2by TheGreatMarioPerson » 30 Oct 2016, 10:51

Thats i been asking the WHOLE TIME.
Finally someone asks that
Idk.
Current Project: TLOM The Tale of The Star Spirits & MarioTale
Future Project: TLOM Attack on Dinosaur Island
I am a shy person, i dont talk to ppl very much but i can get REALLY
pissed off easy! :mad:


Im supporting this projects:
Spoiler
My Project: Image
Someone elses projects:
Image
Image
Image
Image
Image
Image

MACKACHE
Lord
Lord
Avatar
MACKACHE
Lord
Lord
Age: 16
Reputation: 108
Posts: 522
Joined: 22 Aug 2016
Website Twitter

Post #3by MACKACHE » 30 Oct 2016, 11:48

Like Mario 3D Land and Mario 3D World stuffs?
ImageImage

Alvespires M
Count
Count
Alvespires M
Count
Count
Age: 22
Reputation: 17
Posts: 228
Joined: 20 Aug 2016
Location: Koopa Troopa Beach

Post #4by Alvespires » 30 Oct 2016, 12:37

Don't you know how to use global variables?with them you can do that,eh,most likely because hidding somethin in map dont work,they will appear again when you reestart the map.However,I only tryed to show hidden layer,not hidden them.
Not really up to it.

TheGreatMarioPerson
Count
Count
Avatar
TheGreatMarioPerson
Count
Count
Age: 19
Reputation: 3
Posts: 283
Joined: 3 Jul 2016
Location: Mushroom Kingdom

Post #5by TheGreatMarioPerson » 2 Nov 2016, 18:07

Can tyou explain how to use globe variables
Current Project: TLOM The Tale of The Star Spirits & MarioTale
Future Project: TLOM Attack on Dinosaur Island
I am a shy person, i dont talk to ppl very much but i can get REALLY
pissed off easy! :mad:


Im supporting this projects:
Spoiler
My Project: Image
Someone elses projects:
Image
Image
Image
Image
Image
Image

Alvespires M
Count
Count
Alvespires M
Count
Count
Age: 22
Reputation: 17
Posts: 228
Joined: 20 Aug 2016
Location: Koopa Troopa Beach

Post #6by Alvespires » 2 Nov 2016, 22:27

I really don't have time now,but later maybe...
Not really up to it.

Ice
Duke
Duke
Avatar
Ice
Duke
Duke
Reputation: 15
Posts: 128
Joined: 3 Oct 2016
Location: Seaside Hill/Ocean Palace

Post #7by Ice » 29 Nov 2016, 2:06

WHAT THE WHAT!!! How did I miss this forum!? this is the first thing I asked when I signed up on this website ( of course nobody answered) and so I gave up
and just used 1 green star per level gimmick....
I-I-I-I-T'S-A-ICE TIME! :cool:

also i don't check this site often so sorry if I reply really late :fool:
My Projecct:
Image

Alvespires M
Count
Count
Alvespires M
Count
Count
Age: 22
Reputation: 17
Posts: 228
Joined: 20 Aug 2016
Location: Koopa Troopa Beach

Post #8by Alvespires » 29 Nov 2016, 15:24

First,let me say somethings
-I'm not sure if you can hide/show things in wrld map,so please test for me,as I don't have time now.(if it doesn't work in wrld map,then try on a level,I am sure it works in-levels).
-I'm not placing images,because....you alredy know.
-On the names of the variables/events,PLACE THE PARENTESIS exept if there's a warning telling you to not do.

NOW how to do it:
1-First create your level with the 3 starcoins calling an event when collected.Done?(all levels with Starcoins must call the event)

2-Then open your world and create a variable in one of the options;for my example,I'll call it "StrCoin" but you can name it whatever you want.It's value should be 0.

3-Back to level you created,create a script and remember that Event you created,that the Starcoins call it?Search for a option inside it's with "Scripts" with a box right down,then search for the Script you created right now.In the Script you created,write down THIS:
Spoiler

Code: Select all

gval(nameofvariableyoucreatedhere)=gval(nameofvariableyoucreatedhere)+1


in my case,

Code: Select all

gval(StrCoin)=gval(StrCoin)+1

In this case "End If" isn't need because you didn't used If statements.

4-Let's see if you get it(you knowmfor you learn to use them)
You pick up the starcoin->It calls an event->It calls a Script->It incresses your variable by 1.

A:Learn that for making basic stuff,in this case raising variables.
B:But how they will help me?
A:We will get on that part.

Using Variables.

5-(I'm not sure if that work in world map,but if doesn't work,make in the level a barrier until you get that much star coins)
Hide the level OR make a barrier blocking the level in world map(If doesn't work,in level) and call it a layer of choise.I will call it "Barrier",ok?,and a event,that hides(if it's a barrier) or shows(If it's the level itself).I'll call it "Barrier Destroy". and-oh,don't forget to make other script of your choice in that level/world,then make an auto-start event that auto-calls himseld after every 1 second(if is the case) that call him(The Script)

6-On the newest script,write down the following:
Spoiler

Code: Select all

If gval(nameofthevariable) >= (number of starcoins need to enter(without the parentessis)) Then
  Call TCreate(name of the event that shows or hides the barrier or level,0)
End if
7-OK,that's it.Let's see if you got that part.
If the variable is equal(=) or higher than (>) the number need,then call the event.
Note that END IF is need on that case,and,if it's the case,you can use minus(-),times(*) or divided(/) or lower than (<)

8-Extras
-If you want that the player LOSE some Starcoins on appearence/entrace/barrier destroy of level,then add that to the script on the line that is BEFORE the End if but AFTER the Call TCreate ----
Spoiler
gval(nameofthevariable)=gval(nameofthevariable)-(Number of starcoins you wish to lose(without parentesis))

Hope that help you!
Last edited by Alvespires on 23 Dec 2016, 21:40, edited 5 times in total.
Not really up to it.

Ice
Duke
Duke
Avatar
Ice
Duke
Duke
Reputation: 15
Posts: 128
Joined: 3 Oct 2016
Location: Seaside Hill/Ocean Palace

Post #9by Ice » 30 Nov 2016, 0:41

THANK YOU SO MUCH!!! :biggrin: I really appreciate it !!! :good:
I-I-I-I-T'S-A-ICE TIME! :cool:

also i don't check this site often so sorry if I reply really late :fool:
My Projecct:
Image

Alvespires M
Count
Count
Alvespires M
Count
Count
Age: 22
Reputation: 17
Posts: 228
Joined: 20 Aug 2016
Location: Koopa Troopa Beach

Post #10by Alvespires » 30 Nov 2016, 1:20

Ops-I forgot!You can only test it in Game itself.No Level Editor.
Not really up to it.

Ice
Duke
Duke
Avatar
Ice
Duke
Duke
Reputation: 15
Posts: 128
Joined: 3 Oct 2016
Location: Seaside Hill/Ocean Palace

Post #11by Ice » 1 Dec 2016, 1:51

Because I can't test it out due to my "world map won't open up path with smb exit" and I have to wait for a bugfix, I'm just gonna do the 1 green star per level gimmick... for now.... :whistle:
I-I-I-I-T'S-A-ICE TIME! :cool:

also i don't check this site often so sorry if I reply really late :fool:
My Projecct:
Image

Alvespires M
Count
Count
Alvespires M
Count
Count
Age: 22
Reputation: 17
Posts: 228
Joined: 20 Aug 2016
Location: Koopa Troopa Beach

Post #12by Alvespires » 23 Dec 2016, 21:31

Oh my GOD!Now I noticed that Spoiler tabs don't allow blank spaces :facepalm: I will fix those codes I made wrong right now
Not really up to it.


Return to “Super Mario Bros. X by 38A (SMBX-38A)”

Who is online (over the past 5 minutes)

Users browsing this forum: 1 guest