It is possible to access the methods of a script through other script? I mean, I have a custom script that changes some game mechanics, and it's all controlled by an object named GameController (public static class GameController).
I want to create an extension script that makes the previous script compatible with other game modes rather than versus.
Can I, for example, access GameController.SayLine() (custom method inside custom class) through another script?
Access script methods throug other script
Forum rules
By using the forum you agree to the following rules.
By using the forum you agree to the following rules.
- JakSparro98
- Superfighter
- Posts: 530
- Joined: Fri Jul 15, 2016 7:56 pm
- Started SFD: PreAlpha 1.0.5
- Location: Rome, Italy
- Gender:
- Age: 25
Extension scripts live in their own ecosystem, they can access common data zones like game session and local storage but methods, declared types and variables are exclusive of the script that implemented it.
0 x
- Mr Argon
- Fighter
- Posts: 56
- Joined: Sat Mar 09, 2019 2:22 am
- SFD Account: Argón (steam)
- SFD Alias: Mr. Argon
- Started SFD: Pre-Alpha 1.8.2c
- Location: Argentina
- Gender:
- Age: 20
Maybe using localstorage I can access, because I don't want to make my script much longer, it actually has around 700 lines. Using another script for compatibility could be really useful
0 x
I'м д Liттlэ оdd... sтill саи livе шiтн тнат.