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?
Dear forum users! In compliance with the new European GDPR regulations, we'd just like to inform you that if you have an account, your email address is stored in our database. We do not share your information with third parties, and your email address and password are encrypted for security reasons.
New to the forum? Say hello in this topic! Also make sure to read the rules.
New to the forum? Say hello in this topic! Also make sure to read the 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