Return to post
- settings
- {
- main
- {
- Description: "Samito's Moira Orb by @andygmb1"
- }
- modes
- {
- Assault
- {
- Competitive Rules: On
- Limit Roles: 2 Of Each Role Per Team
- }
- Control
- {
- Competitive Rules: On
- Limit Roles: 2 Of Each Role Per Team
- Score To Win: 2
- }
- Escort
- {
- Competitive Rules: On
- Limit Roles: 2 Of Each Role Per Team
- }
- Hybrid
- {
- Competitive Rules: On
- Limit Roles: 2 Of Each Role Per Team
- }
- }
- }
- variables
- {
- global:
- 0: orb_speed
- 1: orb_explosion_radius
- 2: orb_cooldown
- 3: orb_max_distance
- 4: orb_explosion_delay
- 5: orb_drop_acceleration
- 6: seperate_heal_cd
- 7: orb_heal_cd
- 9: healing_mitigation_pc
- 10: healing_mitigation_time
- player:
- 0: orb_selection_open
- 1: orb_cooldown_timer
- 2: first_person_effects
- 3: orb_active
- 4: orb_destination
- 5: orb_current_pos
- 6: active_orb_effect
- 7: orb_is_stuck
- 8: shields_raycast
- 9: lookahead_raycast_end_pos
- 10: orb_acceleration
- 11: orb_explode
- 12: orb_type
- 13: player_raycast
- 14: direction_thrown
- 15: affected_players_dmg
- 16: is_being_heal_mitigated
- 17: aura_effect
- }
- subroutines
- {
- 0: open_orb_selection
- 1: close_orb_selection
- 3: shield_and_player_detection
- 4: setup_shieldplayer_d_variables
- 5: send_heal_orb_fast
- 6: apply_heal_mitigation
- }
- rule("Global settings")
- {
- event
- {
- Ongoing - Global;
- }
- actions
- {
- Global.orb_max_distance = Workshop Setting Integer(Custom String("Moira Orb Settings"), Custom String("Orb Max Travel Distance"),
- 20, 1, 100);
- Global.orb_explosion_radius = Workshop Setting Integer(Custom String("Moira Orb Settings"), Custom String("Orb Explosion Radius"),
- 6, 1, 100);
- Global.orb_cooldown = Workshop Setting Integer(Custom String("Moira Orb Settings"), Custom String("Orb Cooldown (seconds)"), 4, 1,
- 20);
- Global.orb_speed = Workshop Setting Integer(Custom String("Moira Orb Settings"), Custom String("Orb Speed"), 15, 1, 100);
- Global.orb_explosion_delay = Workshop Setting Integer(Custom String("Moira Orb Settings"), Custom String(
- "Orb Explosion Delay (milliseconds)"), 500, 1, 10000);
- Global.orb_drop_acceleration = Workshop Setting Integer(Custom String("Moira Orb Settings"), Custom String(
- "Orb Drop Acceleration (how fast it drops after hitting shield)"), 5, 1, 20);
- Global.seperate_heal_cd = Workshop Setting Toggle(Custom String("Heal orb settings"), Custom String(
- "1. If heal orb is used, set new different cooldown"), True);
- Global.orb_heal_cd = Workshop Setting Integer(Custom String("Heal orb settings"), Custom String(
- "2. Heal orb cooldown (optional, set toggle above)"), 10, 1, 20);
- Global.healing_mitigation_pc = Workshop Setting Integer(Custom String("Heal Mitigation Settings"), Custom String(
- "Heal Mitigation Percent (0 will work like Ana nade anti)"), 40, 0, 100);
- Global.healing_mitigation_time = Workshop Setting Real(Custom String("Heal Mitigation Settings"), Custom String(
- "Healing mitigation time (how long a player will have mitigated heals)"), 2.500, 1, 20);
- }
- }
- rule("Moira Player vars")
- {
- event
- {
- Ongoing - Each Player;
- All;
- Moira;
- }
- actions
- {
- Event Player.orb_selection_open = False;
- Event Player.orb_cooldown_timer = 0;
- Event Player.first_person_effects = Array();
- Disallow Button(Event Player, Ability 2);
- }
- }
- rule("open orb selection")
- {
- event
- {
- Subroutine;
- open_orb_selection;
- }
- actions
- {
- Event Player.orb_selection_open = True;
- Enable Messages(Event Player);
- Create Effect(Event Player, Orb, Yellow, Eye Position(Event Player) + 2 * Facing Direction Of(Event Player) + 1 * World Vector Of(
- Left, Event Player, Rotation) + Vector(0, -0.500, 0), 0.100, Visible To Position and Radius);
- Modify Player Variable(Event Player, first_person_effects, Append To Array, Last Created Entity);
- Create Effect(Event Player, Orb, Purple, Eye Position(Event Player) + 2 * Facing Direction Of(Event Player) + 1 * World Vector Of(
- Right, Event Player, Rotation) + Vector(0, -0.500, 0), 0.100, Visible To Position and Radius);
- Modify Player Variable(Event Player, first_person_effects, Append To Array, Last Created Entity);
- Set Primary Fire Enabled(Event Player, False);
- Set Secondary Fire Enabled(Event Player, False);
- }
- }
- rule("close orb selection")
- {
- event
- {
- Subroutine;
- close_orb_selection;
- }
- actions
- {
- Event Player.orb_selection_open = False;
- Disable Messages(Event Player);
Destroy Effect(Event Player.first_person_effects[0]);
Modify Player Variable(Event Player, first_person_effects, Remove From Array By Index, 0);
Destroy Effect(Event Player.first_person_effects[0]);
Modify Player Variable(Event Player, first_person_effects, Remove From Array By Index, 0);
- While(Count Of(Event Player.first_person_effects) > 0);
- Destroy Effect(Event Player.first_person_effects[0]);
- Modify Player Variable(Event Player, first_person_effects, Remove From Array By Index, 0);
- Wait(0.016, Ignore Condition);
- End;
- Set Primary Fire Enabled(Event Player, True);
- Set Secondary Fire Enabled(Event Player, True);
- }
- }
- rule("press e")
- {
- event
- {
- Ongoing - Each Player;
- All;
- Moira;
- }
- conditions
- {
- Is Button Held(Event Player, Ability 2) == True;
- Event Player.orb_active == False;
- Event Player.orb_cooldown_timer == 0;
- Is Using Ultimate(Event Player) == False;
- }
- actions
- {
- If(Event Player.orb_selection_open == False);
- Call Subroutine(open_orb_selection);
- Else;
- Call Subroutine(close_orb_selection);
- }
- }
- rule("Loop showing the small message for button press")
- {
- event
- {
- Ongoing - Each Player;
- All;
- Moira;
- }
- conditions
- {
- Event Player.orb_selection_open == True;
- }
- actions
- {
- Small Message(Event Player, Custom String(" Heal {0} | | {1} Damage", Input Binding String(Button(
- Primary Fire)), Input Binding String(Button(Secondary Fire))));
- Wait(3, Ignore Condition);
- Loop If Condition Is True;
- }
- }
- rule("primary fire orb (heal) sent")
- {
- event
- {
- Ongoing - Each Player;
- All;
- Moira;
- }
- conditions
- {
- Event Player.orb_selection_open == True;
- Is Button Held(Event Player, Primary Fire) == True;
- }
- actions
- {
- Call Subroutine(send_heal_orb_fast);
- Event Player.orb_selection_open = False;
- Event Player.orb_active = True;
- If(Global.seperate_heal_cd == True);
- Call Subroutine(close_orb_selection);
- Event Player.orb_cooldown_timer = Global.orb_heal_cd;
- Chase Player Variable At Rate(Event Player, orb_cooldown_timer, 0, 1, Destination and Rate);
- Wait(0.016, Ignore Condition);
- Set Ability Cooldown(Event Player, Button(Ability 2), Global.orb_heal_cd);
- Wait(Global.orb_heal_cd, Ignore Condition);
- Event Player.orb_active = False;
- Else;
- Call Subroutine(close_orb_selection);
- Event Player.orb_cooldown_timer = Global.orb_cooldown;
- Chase Player Variable At Rate(Event Player, orb_cooldown_timer, 0, 1, Destination and Rate);
- Wait(0.016, Ignore Condition);
- Set Ability Cooldown(Event Player, Button(Ability 2), Global.orb_cooldown);
- Wait(Global.orb_cooldown, Ignore Condition);
- Event Player.orb_active = False;
- End;
- }
- }
- rule("secondary fire orb (damage) sent")
- {
- event
- {
- Ongoing - Each Player;
- All;
- Moira;
- }
- conditions
- {
- Event Player.orb_selection_open == True;
- Is Button Held(Event Player, Secondary Fire) == True;
- }
- actions
- {
- disabled Wait(0.100, Ignore Condition);
- Call Subroutine(close_orb_selection);
- Press Button(Event Player, Melee);
- Event Player.orb_type = 1;
- Call Subroutine(setup_shieldplayer_d_variables);
- Chase Player Variable At Rate(Event Player, orb_current_pos, Event Player.orb_destination, Global.orb_speed, Destination and Rate);
- Create Effect(All Players(All Teams), Orb, Purple, Event Player.orb_current_pos, 1, Visible To Position and Radius);
- Event Player.active_orb_effect = Last Created Entity;
- Call Subroutine(shield_and_player_detection);
- }
- }
- rule("orb exploded")
- {
- event
- {
- Ongoing - Each Player;
- All;
- Moira;
- }
- conditions
- {
- Event Player.orb_explode == True;
- }
- actions
- {
- Stop Chasing Player Variable(Event Player, orb_current_pos);
- Stop Chasing Player Variable(Event Player, orb_acceleration);
Destroy Effect(Event Player.orb_active);
- Destroy Effect(Event Player.active_orb_effect);
- If(Event Player.orb_type == 1);
- Play Effect(All Players(All Teams), Bad Explosion, Purple, Event Player.orb_current_pos, Global.orb_explosion_radius);
- Play Effect(All Players(All Teams), Explosion Sound, White, Event Player.orb_current_pos, 100);
- Call Subroutine(apply_heal_mitigation);
- Else;
- Play Effect(All Players(All Teams), Good Explosion, Yellow, Event Player.orb_current_pos, Global.orb_explosion_radius);
- Play Effect(All Players(All Teams), Buff Impact Sound, White, Event Player.orb_current_pos, 100);
- End;
- Event Player.orb_active = False;
- Event Player.orb_cooldown_timer = Global.orb_cooldown;
- Chase Player Variable At Rate(Event Player, orb_cooldown_timer, 0, 1, Destination and Rate);
- Wait(0.016, Ignore Condition);
- Set Ability Cooldown(Event Player, Button(Ability 2), Global.orb_cooldown);
- }
- }
- rule("shield and player detection subroutine")
- {
- event
- {
- Subroutine;
- shield_and_player_detection;
- }
- actions
- {
- While(Event Player.orb_is_stuck != True);
- Event Player.shields_raycast = Ray Cast Hit Position(Event Player.orb_current_pos,
- Event Player.orb_current_pos + Direction Towards(Event Player.orb_current_pos, Event Player.orb_destination) / 2, All Players(
- Opposite Team Of(Team Of(Event Player))), Event Player, True);
- Event Player.lookahead_raycast_end_pos = Ray Cast Hit Position(Event Player.orb_current_pos,
- Event Player.orb_current_pos + Direction Towards(Event Player.orb_current_pos, Event Player.orb_destination) / 2, Array(),
- All Players(All Teams), False);
- If(Event Player.shields_raycast != Event Player.lookahead_raycast_end_pos);
- Event Player.player_raycast = Ray Cast Hit Player(Event Player.orb_current_pos,
- Event Player.orb_current_pos + Event Player.orb_destination / 2, All Players(Opposite Team Of(Team Of(Event Player))),
- Event Player, True);
- Event Player.orb_is_stuck = True;
- Stop Chasing Player Variable(Event Player, orb_current_pos);
- If(Event Player.player_raycast != Null);
- Event Player.orb_current_pos = Eye Position(Event Player.player_raycast) - Vector(0, 0.300, 0);
- Else;
- Wait(0.050, Ignore Condition);
- Chase Player Variable At Rate(Event Player, orb_current_pos, Ray Cast Hit Position(Event Player.orb_current_pos,
- Event Player.orb_current_pos + Down * 10, All Players(Opposite Team Of(Team Of(Event Player))), Event Player, True),
- Event Player.orb_acceleration, Destination and Rate);
- Chase Player Variable At Rate(Event Player, orb_acceleration, 10.300,
- Event Player.orb_acceleration + Event Player.orb_acceleration, Destination and Rate);
- End;
- Wait(Global.orb_explosion_delay / 1000, Ignore Condition);
- Event Player.orb_explode = True;
Else If(Is Button Held(Event Player, Ability 2));
Event Player.orb_is_stuck = True;
Event Player.orb_explode = True;
- Else If(Event Player.orb_current_pos == Event Player.orb_destination);
- Event Player.orb_is_stuck = True;
- If(Ray Cast Hit Position(Event Player.orb_current_pos, Event Player.orb_current_pos + Event Player.direction_thrown * 2,
- All Players(All Teams), Event Player, True) != Event Player.orb_current_pos + Event Player.direction_thrown * 2);
- Wait(Global.orb_explosion_delay / 1000, Ignore Condition);
- End;
- Event Player.orb_explode = True;
- Else If(Is Button Held(Event Player, Ability 2) && Is Button Held(Event Player, Secondary Fire) != True);
- Wait(0.100, Ignore Condition);
- If(Is Button Held(Event Player, Ability 2) && Is Button Held(Event Player, Secondary Fire) != True);
- Event Player.orb_is_stuck = True;
- Event Player.orb_explode = True;
- End;
- End;
- Wait(0.016, Ignore Condition);
- End;
- }
- }
- rule("setup vars for shield and player detection")
- {
- event
- {
- Subroutine;
- setup_shieldplayer_d_variables;
- }
- actions
- {
- Event Player.orb_explode = False;
- Event Player.orb_is_stuck = False;
- Event Player.orb_acceleration = Global.orb_drop_acceleration;
- Event Player.orb_active = True;
- Event Player.orb_destination = Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player) + Facing Direction Of(
- Event Player) * Global.orb_max_distance, Array(), Event Player, True);
- Event Player.orb_current_pos = Eye Position(Event Player);
- Event Player.direction_thrown = Direction Towards(Event Player.orb_current_pos, Event Player.orb_destination);
- }
- }
- rule("send heal orb fast")
- {
- event
- {
- Subroutine;
- send_heal_orb_fast;
- }
- actions
- {
- Allow Button(Event Player, Ability 2);
- Wait(0.016, Ignore Condition);
- Press Button(Event Player, Ability 2);
Wait(0.085, Ignore Condition);
- Wait(0.120, Ignore Condition);
- Press Button(Event Player, Primary Fire);
- Wait(0.016, Ignore Condition);
- Disallow Button(Event Player, Ability 2);
- }
- }
- rule("apply heal mitigation subroutine")
- {
- event
- {
- Subroutine;
- apply_heal_mitigation;
- }
- actions
- {
- Event Player.affected_players_dmg = Players Within Radius(Event Player.orb_current_pos, Global.orb_explosion_radius,
- Opposite Team Of(Team Of(Event Player)), Surfaces And All Barriers);
- Event Player.affected_players_dmg.is_being_heal_mitigated = True;
- }
- }
- rule("start healing modif")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Event Player.is_being_heal_mitigated == True;
- }
- actions
- {
- Start Healing Modification(Event Player, All Players(All Teams), Global.healing_mitigation_pc, None);
- Wait(0.016, Ignore Condition);
- Create Effect(All Players(All Teams), Bad Aura, Purple, Event Player, 1, Visible To Position and Radius);
- Event Player.aura_effect = Last Created Entity;
- Wait(Global.healing_mitigation_time, Ignore Condition);
Destroy Effect(Last Created Entity);
- Destroy Effect(Event Player.aura_effect);
- Event Player.is_being_heal_mitigated = False;
- Stop Healing Modification(Last Healing Modification ID);
- }
- }
- disabled rule("Create Moira Bot for Example")
- {
- event
- {
- Ongoing - Global;
- }
- actions
- {
- Create Dummy Bot(Hero(Pharah), Team 2, 2, Vector(-12.500, 0, 12.500), Vector(0, 0, 0));
- Create Dummy Bot(Hero(Doomfist), Team 2, 3, Vector(-12.500, 0, -2.500), Vector(0, 0, 0));
- Create Dummy Bot(Hero(Reinhardt), Team 2, 4, Vector(-12.500, 0, 5), Vector(0, 0, 0));
- Create Dummy Bot(Hero(Roadhog), Team 1, 4, Vector(0, 0, 0), Vector(0, 0, 0));
- Create Dummy Bot(Hero(Reinhardt), Team 1, 5, Vector(10, 0, 0), Vector(10, 0, 0));
- Wait(0.016, Ignore Condition);
- Start Holding Button(Players On Hero(Hero(Reinhardt), All Teams), Secondary Fire);
- }
- }
- rule("Close the orb selection panel if you're using ult or fading")
- {
- event
- {
- Ongoing - Each Player;
- All;
- Moira;
- }
- conditions
- {
- (Is Using Ultimate(Event Player) || Is Using Ability 1(Event Player)) == True;
- }
- actions
- {
- Call Subroutine(close_orb_selection);
- }
- }