Is there a way to change the script method by entering certain area in the map?
public void Bot(CreateTriggerArgs args){
IPlayer ply = (IPlayer)args.CreatedObject;
ply.SetBotType(BotType.TutorialA);
}
I have this scrip that makes the CPU's attack you automatically when you set the Script Method to Bot, but I would like to make it work so that when you enter certain area the script method of a SpawnPlayerTrigger would change from none to Bot.
Can a script make this happen?
This forum is locked and will eventually go offline. If you have feedback to share you can find us in our Discord channel "MythoLogic Interactive" https://discord.gg/nECKnbT7gk
Forum rules
Forum rules
Script Method
Forum rules
By using the forum you agree to the following rules.
By using the forum you agree to the following rules.
- Splinter
- Superfighter

- Posts: 314
- Joined: Sat Mar 19, 2016 5:03 pm
- Title: Grenade chef
- Started SFD: 1.1.6
- Location: Brazil
- Gender:
I think there are simpler ways to do this. Make a global variable that becomes true when you enter the area, and make this script only work if "var == true".
1 x
Hold your breath.
- gwendalaze
- Superfighter

- Posts: 84
- Joined: Sat Mar 19, 2016 12:55 pm
- Title: Jarate Yellow Belt
- Started SFD: PreAlpha 1.1.4
- Location: France
trigger.SetScriptMethod(null);
and
trigger.SetScriptMethod("method");
with methods that are triggered by entering/exiting said areas
*fly away*
and
trigger.SetScriptMethod("method");
with methods that are triggered by entering/exiting said areas
*fly away*
1 x
- Gwendalaze, failing at being fun, just like this signature
