Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Script toggling

How do I make a script have the ability to be turned on and off via scripting? I know I have to use switches, but I'm not clear on how it's done.
 
If it's Fukuyama's, the default switch to turn it on and off is switch #20. You can change the switch number to something else at a place near the top of the script, but I can't remember off hand which line it is.

This question has been asked several times now. I myself asked it a while back, though at the time, there weren't really any threads adressing it. I'm beginning to think it should be added to the FAQ, despite the fact that it deals with a specific script. :P

Edit: It's line 15. You should see something there that says:
TRAIN_ACTOR_TRANSPARENT_SWITCHES_INDEX = 20

Just change the number 20 to the number of the switch you want to turn the caterpillar train on/off. If, that is, it's Fukuyama's script you're using.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top