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.

disable a script to use another one instead

Hello! I was wondering whether someone knows how I can switch between two scripts. I would like to switch between the "train actor script"(which I want to use in dungeons and houses) and the "squad movement script"(I want to use it outside). I thought about creating a switch and define it in a script and the use it with a teleporting event...

It would look the following:

Test_Switch_Index = 10
if Test_Switch = true
---script---
end

in first the script and

if Test_Switch = false
---script---
end

in the second one

and then as an example:

Transfer Player:[002],(005,011)
Control Switches:[0010:Test Switch]=ON

in the event

But it does not work at all. Instead I now have two sprites on the map, 1 moves in the sqad movement way and the other one follows me with train actor!

Has anyone an idea of how I can fix this, or maybe a better idea of changing between these scripts?
 
You know, I looked into it further, and I really doubt you can even do that. even the sdk commands I posted earlier do not disable or enable a sdk script ingame, unless it was run before the if statement which runs as soon as the program is run.

I'm sorry.
 
Mmmh....-_- You're probably right.
But thank you all for trying! I really appreciate your efforts!!
I just have to take my exam(abitur) in the next two weeks then I'll try to engage in Ruby a little bit deeper and maybe I find a way.....(someday)
 

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