Permanent Events

Description: Internal scripting system of SMBX-38A Engine based on the simple VB-like language
Moderators: Lx Xzit, Yoshi021, 5438A38A, Moderators, Semi-moderatos

Cheezepin
Topic author, Citizen
Citizen
Cheezepin
Topic author, Citizen
Citizen
Reputation: 2
Posts: 6
Joined: 28 Nov 2017

Post #1by Cheezepin » 28 Nov 2017, 0:04

I'm completely new to TeaScript, so this may be common knowledge, but is there any way to write scripts in a way to have an event happen and be able to have it occur permanently? For example, a bridge opening up via an event, but staying up if the game is exited and came back to.

Thanks.

Ariinui
Duke
Duke
Ariinui
Duke
Duke
Age: 23
Reputation: 19
Posts: 140
Joined: 5 Mar 2017

Post #2by Ariinui » 28 Nov 2017, 3:16

it can be done if you triggered it by a global variable

Cheezepin
Topic author, Citizen
Citizen
Cheezepin
Topic author, Citizen
Citizen
Reputation: 2
Posts: 6
Joined: 28 Nov 2017

Post #3by Cheezepin » 28 Nov 2017, 5:41

How do I work with global variables? I've tried looking it up but I just can't figure it out. Could I have some sort of example?

Thanks.

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

Post #4by Eri7 » 28 Nov 2017, 9:23

Cheezepin wrote:How do I work with global variables? I've tried looking it up but I just can't figure it out. Could I have some sort of example?

Thanks.

Create a global variable , then create a script:
If gval(name of variable) = 1 then
Call Tcreate(name of the event, 0)
End if
: then create another script:
gval(name of the variable) = gval(name of the variable) + 1
:then activate the second script when you want to open the bridge and activate the first script from autostart event.
Join the discord server about Nova Projects.
Image

I support:
Image

Cheezepin
Topic author, Citizen
Citizen
Cheezepin
Topic author, Citizen
Citizen
Reputation: 2
Posts: 6
Joined: 28 Nov 2017

Post #5by Cheezepin » 28 Nov 2017, 17:04

Eri7 wrote:
Cheezepin wrote:How do I work with global variables? I've tried looking it up but I just can't figure it out. Could I have some sort of example?

Thanks.

Create a global variable , then create a script:
If gval(name of variable) = 1 then
Call Tcreate(name of the event, 0)
End if
: then create another script:
gval(name of the variable) = gval(name of the variable) + 1
:then activate the second script when you want to open the bridge and activate the first script from autostart event.
Thank you so, so much!

Toshiie M
Good citizen
Good citizen
Avatar
Toshiie M
Good citizen
Good citizen
Age: 16
Reputation: 4
Posts: 29
Joined: 6 Nov 2017

Post #6by Toshiie » 17 Dec 2017, 21:19

Eri7 wrote:
Cheezepin wrote:How do I work with global variables? I've tried looking it up but I just can't figure it out. Could I have some sort of example?

Thanks.

Create a global variable , then create a script:
If gval(name of variable) = 1 then
Call Tcreate(name of the event, 0)
End if
: then create another script:
gval(name of the variable) = gval(name of the variable) + 1
:then activate the second script when you want to open the bridge and activate the first script from autostart event.

Wow, this is very useful to make switch palaces!
Image
Image
Image


Return to “TeaScript”

Who is online (over the past 5 minutes)

Users browsing this forum: 1 guest