(Script Request) Switch Palaces and Switch Blocks

Description: Have idea for a script, but you can't make it? Post it here!
Moderators: Lx Xzit, Yoshi021, 5438A38A, Moderators, Semi-moderatos

TryLouBliss
Topic author, Nice citizen
Nice citizen
TryLouBliss
Topic author, Nice citizen
Nice citizen
Reputation: 1
Posts: 15
Joined: 14 Mar 2016

Post #1by TryLouBliss » 17 Sep 2016, 2:56

I would like to know: can anyone try to make a script that uses Switch Palaces, and the respective color blocks turning solid all throughout the episode when you clear the Switch Palace level? This would make some pretty interesting features.

TheCreator520
Our friend
Our friend
Avatar
TheCreator520
Our friend
Our friend
Reputation: 59
Posts: 77
Joined: 21 Feb 2016

Post #2by TheCreator520 » 17 Sep 2016, 5:24

Set the Global varriable "SwichOn" , a layer called "Blocks" and set a script "Detect" in the "Level - Start" Event in every level .
Script "Detect" :
If gval(SwichOn) = 1 Then
Call Lset(Blocks,1,1)
Else
Call Lset(Blocks,2,1)
End if
The script means if the global varriable is 1 , the blocks will show . Else will not .
You can only test and active it when you are playing the episode .
Hope it can help you :P
Image

TryLouBliss
Topic author, Nice citizen
Nice citizen
TryLouBliss
Topic author, Nice citizen
Nice citizen
Reputation: 1
Posts: 15
Joined: 14 Mar 2016

Post #3by TryLouBliss » 18 Sep 2016, 1:39

Every time I try to click "Add" in Global Variables mode, nothing happens, so I'm stuck. Also, how do I set a script for an event?

EDIT: I now know that you can set a script to trigger an event in the "Others" section.
Last edited by TryLouBliss on 18 Sep 2016, 2:01, edited 1 time in total.

Yoshi021 M
Moderator
Moderator
Avatar
Yoshi021 M
Moderator
Moderator
Age: 18
Reputation: 120
Posts: 667
Joined: 15 Feb 2016
Location: Yoshi's Island

Post #4by Yoshi021 » 18 Sep 2016, 1:49

TryLouBliss wrote:Every time I try to click "Add" in Global Variables mode, nothing happens, so I'm stuck. Also, how do I set a script for an event?
You have to add global variables in World Editor.
Links
ImageImageImage
Image
Image
"Going to University is FUN!" :pardon:

TryLouBliss
Topic author, Nice citizen
Nice citizen
TryLouBliss
Topic author, Nice citizen
Nice citizen
Reputation: 1
Posts: 15
Joined: 14 Mar 2016

Post #5by TryLouBliss » 18 Sep 2016, 2:03

I don't get variables in World Editor. It's not available in the "View" drop menu; it's only seen in Level Editor. Or am I missing something?

EDIT: I now know that you can set Global Variables in the World Settings.

EDIT 2: Now I need to know how to make the script happen in the levels by clearing a certain level, which is the Switch Palace itself. How do I do this?

Alvespires M
Count
Count
Avatar
Alvespires M
Count
Count
Age: 18
Reputation: 16
Posts: 222
Joined: 20 Aug 2016
Location: Koopa Troopa Beach

Post #6by Alvespires » 18 Sep 2016, 2:23

Make a event that calls the Script Call gval(Name of the Global variable you created here) +1.This event heappen when you step on the switch.Don't forget to make a layer on the levels that has Blocks of that color and make this sprite on "AutoStart"

If gval(name of global variable) = 1 Then
Call Lset(name of blocks layer,1,1)
Else
Call Lset(name of blocks layer,2,1)
"This giant fish is a mouth breeder, so it spits babies out of its mouth at Mario." - Nintendo Power Strategy Guide for Super Mario Bros. 3

I don't really have anything to say.

I think I also probably lost it.

I'm supporting:

Spoiler

Image

I know I'm annoying sometimes,so please send me a PM if one of my messages hurts your feelings or if it's stupid so you can help me become a better person.

Spoiler
"And then they said something about 'Vandalism' being a bad thing. What a bunch of hypocrites."

Status: Trying to be more social. Trying to.

Yoshi021 M
Moderator
Moderator
Avatar
Yoshi021 M
Moderator
Moderator
Age: 18
Reputation: 120
Posts: 667
Joined: 15 Feb 2016
Location: Yoshi's Island

Post #7by Yoshi021 » 18 Sep 2016, 2:28

Alvespires wrote:Make a event that calls the Script Call gval(Name of the Global variable you created here) +1.This event heappen when you step on the switch.Don't forget to make a layer on the levels that has Blocks of that color and make this sprite on "AutoStart"

If gval(name of global variable) = 1 Then
Call Lset(name of blocks layer,1,1)
Else
Call Lset(name of blocks layer,2,1)

I would do gval(Switch) = 1 rather that gval(Switch) = gval(Switch) + 1
Links
ImageImageImage
Image
Image
"Going to University is FUN!" :pardon:

Alvespires M
Count
Count
Avatar
Alvespires M
Count
Count
Age: 18
Reputation: 16
Posts: 222
Joined: 20 Aug 2016
Location: Koopa Troopa Beach

Post #8by Alvespires » 18 Sep 2016, 2:33

Yoshi021 wrote:
Alvespires wrote:Make a event that calls the Script Call gval(Name of the Global variable you created here) +1.This event heappen when you step on the switch.Don't forget to make a layer on the levels that has Blocks of that color and make this sprite on "AutoStart"

If gval(name of global variable) = 1 Then
Call Lset(name of blocks layer,1,1)
Else
Call Lset(name of blocks layer,2,1)

I would do gval(Switch) = 1 rather that gval(Switch) = gval(Switch) + 1

Switch palaces are destroyed after clear :dance1: so i don't see why change that
"This giant fish is a mouth breeder, so it spits babies out of its mouth at Mario." - Nintendo Power Strategy Guide for Super Mario Bros. 3

I don't really have anything to say.

I think I also probably lost it.

I'm supporting:

Spoiler

Image

I know I'm annoying sometimes,so please send me a PM if one of my messages hurts your feelings or if it's stupid so you can help me become a better person.

Spoiler
"And then they said something about 'Vandalism' being a bad thing. What a bunch of hypocrites."

Status: Trying to be more social. Trying to.

KFCMARIO
Good citizen
Good citizen
Avatar
KFCMARIO
Good citizen
Good citizen
Reputation: 22
Posts: 33
Joined: 25 Jan 2016

Post #9by KFCMARIO » 18 Sep 2016, 4:28

Yoshi021 wrote:
Alvespires wrote:Make a event that calls the Script Call gval(Name of the Global variable you created here) +1.This event heappen when you step on the switch.Don't forget to make a layer on the levels that has Blocks of that color and make this sprite on "AutoStart"

If gval(name of global variable) = 1 Then
Call Lset(name of blocks layer,1,1)
Else
Call Lset(name of blocks layer,2,1)

I would do gval(Switch) = 1 rather that gval(Switch) = gval(Switch) + 1
'End if' is needed after using 'If ...then ... else'
BTW, 'If variable then ...' is recommended rather 'If variable = 1 then ... ',like
If gval(Switch) then
...
...

Filemon-
Citizen
Citizen
Filemon-
Citizen
Citizen
Reputation: 0
Posts: 8
Joined: 8 Mar 2017

Post #10by Filemon- » 9 Mar 2017, 1:58

Hi everybody,

You can write me what script i have put in switch palace level and what script i have put in all levels for seen switch blocks, please?

PK Esper F
Lord
Lord
Avatar
PK Esper F
Lord
Lord
Age: 12
Reputation: 105
Posts: 520
Joined: 22 Aug 2016
Location: The sky
Website Facebook Google+ Twitter

Post #11by PK Esper » 9 Mar 2017, 9:07

Filemon- wrote:switch palace level
You've post about this like 5 times.
why i hadn't been in this forum for long when i used to be a super active person
avatar is basically baldi from tumblr
Formerly known as RSupertheGreat.
ImageImage
What I support
ImageImageImage
Personality
Yes, I'm a girl. If you guys are thinking I'm a boy.
I hate most people.
I'm a developer (and a beta tester of):
Image
Image
My level/episode playthrough thread: http://wohlsoft.ru/forum/viewtopic.php?f=29&t=2185

Filemon-
Citizen
Citizen
Filemon-
Citizen
Citizen
Reputation: 0
Posts: 8
Joined: 8 Mar 2017

Post #12by Filemon- » 9 Mar 2017, 14:18

I don't understand English very well. Where I have put the script? What is it the script of switch palace and what is it the script of all levels?

You help to me please.

Eri7 M
Count
Count
Avatar
Eri7 M
Count
Count
Age: 17
Reputation: 73
Posts: 259
Joined: 19 Dec 2016
Location: Germany , Bonn

Post #13by Eri7 » 9 Mar 2017, 18:54

Filemon- wrote:I don't understand English very well. Where I have put the script? What is it the script of switch palace and what is it the script of all levels?

You help to me please.

Put the script in the level with the switch palace and when the npc (the switch) dies go to the events of the npc and add the script in ,,Death''
gval(switch) = 1

then in every level that has the switch block make it like this:
Add a layer that will be the switch block that are activated and another layer for the switch blocks that aren't activated and then set the the block in one exact place but on different layers , then hide the activated switch blocks and make a event that will hide the switch blocks that aren't activated and will show the switch blocks that are activated. Then make a script:
If gval(switch) = 1 then
call TCreate("Event", 0)
End if

Then create a global variable on the world map with the name ,,switch'' with number 0.
If you have problems with this just send me a message.
Join the discord server about Nova Projects.
Image

I support:
Image

Filemon-
Citizen
Citizen
Filemon-
Citizen
Citizen
Reputation: 0
Posts: 8
Joined: 8 Mar 2017

Post #14by Filemon- » 9 Mar 2017, 20:54

Thanks very much. I finally got it. It can done that after push switch cann't enter in the switch palace?

Added after 14 minutes 24 seconds:
Better. I want that when I exit the switch palace change the icon level in the world. How I can do it?

Eri7 M
Count
Count
Avatar
Eri7 M
Count
Count
Age: 17
Reputation: 73
Posts: 259
Joined: 19 Dec 2016
Location: Germany , Bonn

Post #15by Eri7 » 9 Mar 2017, 21:56

Filemon- wrote:Thanks very much. I finally got it. It can done that after push switch cann't enter in the switch palace?


Better. I want that when I exit the switch palace change the icon level in the world. How I can do it?
You can make the level one layer and the other level that has the other icon another and make a script on the world map that will be :
If gval(switch) = 1 then
call TCreate("name of the event", 0)
End if

Then place the two layers(levels with the switch) on one place and hide the one that you want to appear after the switch in the level is pressed.
Then make a event that will be in the script and make it when its activated to show the layer with the already activated switch and to hide the other layer with the switch that isn't activated.
Join the discord server about Nova Projects.
Image

I support:
Image


Return to “Script requests”

Who is online (over the past 5 minutes)

Users browsing this forum: 1 guest