I have a scripting-related question.

I have a scripting-related question.

Postby TheHeartlessCookie » 09 Feb 2018, 07:12

Is there a way I can use a script trigger to transport Tux to another sector? I need to be able to transport him when he walks into a certain area, rather than using a door.
TheHeartlessCookie
 
Posts: 10
Joined: 14 Oct 2016, 02:11

Re: I have a scripting-related question.

Postby brmbrmcar » 09 Feb 2018, 08:47

{l Code}: {l Select All Code}
Level.spawn("sector","spawnpoint")

Replacing sector for a sector and spawnpoint for a spawnpoint (keep the quotation marks).
brmbrmbrmbrmbrmbrmcar
User avatar
brmbrmcar
 
Posts: 357
Joined: 24 Oct 2015, 14:46

Re: I have a scripting-related question.

Postby Tobbi » 09 Feb 2018, 09:12

Also, make sure that your sectors and spawnpoints have names in the first place! :)
SuperTux developer.
User avatar
Tobbi
SuperTux Moderator
 
Posts: 353
Joined: 12 Oct 2013, 13:08

Re: I have a scripting-related question.

Postby TheHeartlessCookie » 09 Feb 2018, 15:35

Thanks! But what script do I use? Is it covered in your advanced editor tutorial, Brm, or is there just something I've missed?
TheHeartlessCookie
 
Posts: 10
Joined: 14 Oct 2016, 02:11

Re: I have a scripting-related question.

Postby Tobbi » 09 Feb 2018, 15:47

Uh, I don't get what you're asking.

The script to use is in brmbrmcar's post as well.
SuperTux developer.
User avatar
Tobbi
SuperTux Moderator
 
Posts: 353
Joined: 12 Oct 2013, 13:08

Re: I have a scripting-related question.

Postby TheHeartlessCookie » 09 Feb 2018, 20:20

So sorry! My laptop glitched and I didn't see his script. It works now.

Have a great day, and thank you!
TheHeartlessCookie
 
Posts: 10
Joined: 14 Oct 2016, 02:11

Re: I have a scripting-related question.

Postby Tobbi » 09 Feb 2018, 20:22

No problem!

And, as always: If you make something worthwhile, share it with the world!
SuperTux developer.
User avatar
Tobbi
SuperTux Moderator
 
Posts: 353
Joined: 12 Oct 2013, 13:08

Re: I have a scripting-related question.

Postby TheHeartlessCookie » 12 Feb 2018, 09:30

Oh, most definitely! I'm working on a pretty ambitious project right now.
TheHeartlessCookie
 
Posts: 10
Joined: 14 Oct 2016, 02:11

Who is online

Users browsing this forum: No registered users and 1 guest

cron