Create
Return to post

Comparing difference between and

View raw
  • settings
  • {
  • main
  • {
  • Description: "(BM4FCD)Torbjörn's steeplechase トールビョーンの障害物競争 1.05 by @nakamoooooo *ゴール者がインタラクトでカメラを見れるよう変更(テスト中)プライマリ・セカンダリで対象変更"
  • Description: "(BM4FCD)Torbjörn's steeplechase トールビョーンの障害物競争 1.06 by @nakamoooooo *kanezakaを追加 *地面に足がついていないとゴールできないよう変更 *ゴール内では障害物の影響を受けないよう変更 *各状態の開始時にプレイヤーがゴールを向くよう変更"
  • }
  • lobby
  • {
  • Allow Players Who Are In Queue: Yes
  • Match Voice Chat: Enabled
  • Max Spectators: 12
  • }
  • modes
  • {
  • Deathmatch
  • {
  • Game Length In Minutes: 15
  • Score To Win: 50
  • enabled maps
  • {
  • Blizzard World
  • Hollywood
  • Kanezaka
  • King's Row
  • }
  • }
  • General
  • {
  • Game Mode Start: Immediately
  • Limit Roles: 2 Of Each Role Per Team
  • Respawn As Random Hero: On
  • }
  • }
  • heroes
  • {
  • General
  • {
  • Torbjörn
  • {
  • Deploy Turret: Off
  • Overload: Off
  • Primary Fire: Off
  • Quick Melee: Off
  • Secondary Fire: Off
  • Ultimate Ability Molten Core: Off
  • Weapons Enabled: Forge Hammer Only
  • }
  • enabled heroes
  • {
  • Torbjörn
  • }
  • }
  • }
  • }
  • variables
  • {
  • global:
  • 0: start_radius
  • 1: start_pos
  • 2: goal_pos
  • 3: goal_radius
  • 4: current_game_state
  • 5: array_available_item_index
  • 6: array_item_name
  • 7: create_que_deathtrap_pos
  • 8: array_deathtrap_pos
  • 9: array_deathtrap_id
  • 10: deathtrap_radius
  • 11: create_que_bounceball_pos
  • 12: array_bounceball_pos
  • 13: array_bounceball_id
  • 14: bounceball_radius
  • 15: create_que_hydrant_pos
  • 16: array_hydrant_pos
  • 17: array_hydrant_direction
  • 18: array_hydrant_id
  • 19: hydrant_radius
  • 20: create_que_hydrant_dir
  • 22: eraser_radius
  • 23: total_items_count
  • 24: number_of_goaled_players
  • 25: debug_rayhitpos
  • 26: create_que_hammer_pos
  • 27: create_que_hammer_axis
  • 28: array_hammer_pos
  • 29: array_hammer_axis
  • 30: array_hammer_id
  • 31: hammer_ArmRadius
  • 32: hammer_head_radius
  • 33: hammer_theta_current
  • 34: array_hammer_std_dir
  • player:
  • 1: having_items
  • 3: index_of_item_to_set
  • 4: did_goal_or_retire
  • 5: i_collision_loop
  • 6: current_direction_hammer_loop
  • 7: abort_use_item_set_pos
  • 8: arr_did_set_item
  • 9: index_of_pos_to_erace
  • 10: if_spend_5_sec_after_join_100
  • 11: camera_target_player
  • 12: is_using_camera
  • 13: candidates_camera_target
  • }
  • subroutines
  • {
  • 0: set_item
  • 1: use_eraser
  • }
  • rule("kanezaka")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Current Map == Map(Kanezaka);
  • }
  • actions
  • {
  • Global.goal_pos = Vector(-9.300, 10.300, -37.800);
  • Global.start_pos = Vector(-26.450, 10, 20.650);
  • }
  • }
  • rule("hollywood")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Current Map == Map(Hollywood);
  • }
  • actions
  • {
  • Global.goal_pos = Vector(1.500, 11, -60.500);
  • Global.start_pos = Vector(17.800, 1.600, -22.600);
  • }
  • }
  • rule("blizz world")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Current Map == Map(Blizzard World);
  • }
  • actions
  • {
  • Global.goal_pos = Vector(-73, 0.750, 138);
  • Global.start_pos = Vector(-18, 1.900, 88);
  • }
  • }
  • rule("kingsr0w")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Current Map == Map(King's Row);
  • }
  • actions
  • {
  • Global.goal_pos = Vector(-99, 1, -9);
  • Global.start_pos = Vector(-35, 0, -25);
  • }
  • }
  • disabled rule("debug ray hit pos")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Is Button Held(Event Player, Button(Interact)) == True;
  • }
  • actions
  • {
  • Global.debug_rayhitpos = Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player) + 20 * Facing Direction Of(
  • Event Player), Null, Null, True);
  • Play Effect(All Players(All Teams), Good Explosion, Color(White), Global.debug_rayhitpos, 1);
  • }
  • }
  • rule("effect")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Is Game In Progress == True;
  • }
  • actions
  • {
  • Create Effect(All Players(All Teams), Ring, Color(White), Global.start_pos, Global.start_radius, Visible To);
  • Create Effect(All Players(All Teams), Light Shaft, Color(White), Global.goal_pos, Global.goal_radius, Visible To);
  • Create Icon(All Players(All Teams), Global.goal_pos, Flag, Visible To, Color(Green), True);
  • Create HUD Text(All Players(All Teams), String("{0} {1}", String("Server Load"), Server Load), Null, Null, Right, 0, Color(White),
  • Color(White), Color(White), Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), String("{0} {1}", Custom String("total item count: "), Global.total_items_count), Null,
  • Null, Right, 1, Color(White), Color(White), Color(White), Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Custom String("\r\n\r\n\r\n\r\n\r\n\r\n\r\n"), Null, Top, 1, Color(White), Color(
  • White), Color(White), Visible To, Default Visibility);
  • }
  • }
  • rule("init")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • actions
  • {
  • Global.start_radius = 6;
  • Global.goal_radius = 3;
  • Global.array_available_item_index = Array(0, 1, 2, 3);
  • Global.array_item_name = Array(Custom String("death trap デストラップ"), Custom String("blocking ball 通せんボール"), Custom String(
  • "boost pad ブーストパッド"), Custom String("hammer ハンマー"));
  • Global.create_que_deathtrap_pos = Empty Array;
  • Global.array_deathtrap_pos = Empty Array;
  • Global.array_deathtrap_id = Empty Array;
  • Global.deathtrap_radius = 1;
  • Global.create_que_bounceball_pos = Empty Array;
  • Global.array_bounceball_pos = Empty Array;
  • Global.array_bounceball_id = Empty Array;
  • Global.bounceball_radius = 2;
  • Global.create_que_hydrant_pos = Empty Array;
  • Global.array_hydrant_pos = Empty Array;
  • Global.array_hydrant_direction = Empty Array;
  • Global.array_hydrant_id = Empty Array;
  • Global.create_que_hydrant_dir = Empty Array;
  • Global.hydrant_radius = 1.500;
  • Global.create_que_hammer_pos = Empty Array;
  • Global.create_que_hammer_axis = Empty Array;
  • Global.array_hammer_pos = Empty Array;
  • Global.array_hammer_axis = Empty Array;
  • Global.array_hammer_id = Empty Array;
  • Global.hammer_ArmRadius = 2.500;
  • Global.hammer_head_radius = 1.200;
  • Global.hammer_theta_current = 0;
  • Global.array_hammer_std_dir = Empty Array;
  • Global.array_item_name[10] = Custom String("eraser 消しゴム");
  • Global.eraser_radius = 2.500;
  • }
  • }
  • rule("start")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Is Game In Progress == True;
  • }
  • actions
  • {
  • Disable Built-In Game Mode Scoring;
  • Disable Built-In Game Mode Completion;
  • Set Match Time(20);
  • Global.current_game_state = 1;
  • }
  • }
  • rule("gs1 global")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Global.current_game_state == 1;
  • }
  • actions
  • {
  • Set Objective Description(All Players(All Teams), String("{0} {1}", String("Drop"), String("Item")), Visible To);
  • Big Message(All Players(All Teams), Array(Custom String("アイテムを設置しよう"))[0]);
  • Global.number_of_goaled_players = 0;
  • }
  • }
  • rule("gs1 player")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Global.current_game_state == 1;
  • }
  • actions
  • {
  • Set Move Speed(Event Player, 200);
  • Set Jump Vertical Speed(Event Player, 140);
  • Teleport(Event Player, Global.start_pos);
  • Resurrect(Event Player);
  • If(Global.total_items_count >= 20);
  • Event Player.having_items[0] = Random Value In Array(Append To Array(Global.array_available_item_index, 10));
  • Event Player.having_items[1] = Random Value In Array(Remove From Array(Append To Array(Global.array_available_item_index, 10),
  • Event Player.having_items[0]));
  • Else;
  • Event Player.having_items[0] = Random Value In Array(Global.array_available_item_index);
  • Event Player.having_items[1] = Random Value In Array(Remove From Array(Global.array_available_item_index,
  • Event Player.having_items[0]));
  • End;
  • Event Player.did_goal_or_retire = False;
  • Clear Status(Event Player, Rooted);
  • Event Player.arr_did_set_item = Array(False, False);
  • Set Facing(Event Player, Direction Towards(Eye Position(Event Player), Global.goal_pos), To World);
  • }
  • }
  • rule("gs1 end glo")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Global.current_game_state == 1;
  • Match Time == 0;
  • }
  • actions
  • {
  • Teleport(All Players(All Teams), Global.start_pos);
  • Set Match Time(62);
  • Wait(0.016, Ignore Condition);
  • Global.current_game_state = 2;
  • }
  • }
  • rule("gs2 glo")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Global.current_game_state == 2;
  • }
  • actions
  • {
  • Set Objective Description(All Players(All Teams), String("{0} {1}", String("Reach"), String("Goal")), Visible To);
  • Big Message(All Players(All Teams), Array(Custom String("ゴールを目指そう"))[0]);
  • }
  • }
  • rule("gs2 pl")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Global.current_game_state == 2;
  • }
  • actions
  • {
  • Set Status(Event Player, Null, Rooted, 2);
  • Set Move Speed(Event Player, 100);
  • Set Jump Vertical Speed(Event Player, 100);
  • Event Player.arr_did_set_item = Array(True, True);
  • Teleport(Event Player, Global.start_pos);
  • Apply Impulse(Event Player, Down, 0.001, To World, Cancel Contrary Motion);
  • Apply Impulse(Event Player, Forward, 0.001, To World, Cancel Contrary Motion);
  • Apply Impulse(Event Player, Backward, 0.001, To World, Cancel Contrary Motion);
  • Apply Impulse(Event Player, Left, 0.001, To World, Cancel Contrary Motion);
  • Apply Impulse(Event Player, Right, 0.001, To World, Cancel Contrary Motion);
  • Set Facing(Event Player, Direction Towards(Eye Position(Event Player), Global.goal_pos), To World);
  • }
  • }
  • rule("player init")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • actions
  • {
  • Create HUD Text(Event Player.arr_did_set_item[0] ? Null : Event Player, String("{0} - {1}", Input Binding String(Button(
  • Primary Fire)), Global.array_item_name[Event Player.having_items[0]]), Null, Null, Top, 2, Color(White), Color(White), Color(
  • White), Visible To and String, Default Visibility);
  • Create HUD Text(Event Player.arr_did_set_item[1] ? Null : Event Player, String("{0} - {1}", Input Binding String(Button(
  • Secondary Fire)), Global.array_item_name[Event Player.having_items[1]]), Null, Null, Top, 3, Color(White), Color(White), Color(
  • White), Visible To and String, Default Visibility);
  • Disable Built-In Game Mode Respawning(Event Player);
  • Disable Movement Collision With Players(Event Player);
  • Enable Death Spectate All Players(Event Player);
  • Wait(5, Ignore Condition);
  • Event Player.if_spend_5_sec_after_join_100 = 100;
  • }
  • }
  • rule("set_item")
  • {
  • event
  • {
  • Subroutine;
  • set_item;
  • }
  • actions
  • {
  • Event Player.abort_use_item_set_pos = Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)
  • + 2 * Facing Direction Of(Event Player), Null, Null, False);
  • "eraser"
  • If(Event Player.having_items[Event Player.index_of_item_to_set] == 10);
  • Call Subroutine(use_eraser);
  • Abort;
  • End;
  • If(Distance Between(Event Player.abort_use_item_set_pos, Global.start_pos) < Global.start_radius || Distance Between(
  • Event Player.abort_use_item_set_pos, Global.goal_pos) < Global.goal_radius);
  • Small Message(Event Player, String("{0} {1} {2}", String("Item"), String("No"), String("Here")));
  • Abort;
  • End;
  • If(Global.total_items_count >= 126);
  • Small Message(Event Player, String("{0} {1} {2}", String("Max"), String("Items"), String("Reached")));
  • Abort;
  • End;
  • "death trap"
  • If(Event Player.having_items[Event Player.index_of_item_to_set] == 0);
  • Modify Global Variable(create_que_deathtrap_pos, Append To Array, Ray Cast Hit Position(Eye Position(Event Player), Eye Position(
  • Event Player) + 2 * Facing Direction Of(Event Player), Null, Null, True));
  • Event Player.arr_did_set_item[Event Player.index_of_item_to_set] = True;
  • Global.total_items_count += 1;
  • End;
  • "bounce ball"
  • If(Event Player.having_items[Event Player.index_of_item_to_set] == 1);
  • Modify Global Variable(create_que_bounceball_pos, Append To Array, Ray Cast Hit Position(Eye Position(Event Player), Eye Position(
  • Event Player) + 2 * Facing Direction Of(Event Player), Null, Null, True));
  • Event Player.arr_did_set_item[Event Player.index_of_item_to_set] = True;
  • Global.total_items_count += 1;
  • End;
  • "hydrant"
  • If(Event Player.having_items[Event Player.index_of_item_to_set] == 2);
  • Modify Global Variable(create_que_hydrant_pos, Append To Array, Ray Cast Hit Position(Eye Position(Event Player), Eye Position(
  • Event Player) + 2 * Facing Direction Of(Event Player), Null, Null, False));
  • Modify Global Variable(create_que_hydrant_dir, Append To Array, -1 * Facing Direction Of(Event Player));
  • Event Player.arr_did_set_item[Event Player.index_of_item_to_set] = True;
  • Global.total_items_count += 1;
  • End;
  • "hammer"
  • If(Event Player.having_items[Event Player.index_of_item_to_set] == 3);
  • Modify Global Variable(create_que_hammer_pos, Append To Array, Ray Cast Hit Position(Eye Position(Event Player), Eye Position(
  • Event Player) + 2 * Facing Direction Of(Event Player), Null, Null, False));
  • Modify Global Variable(create_que_hammer_axis, Append To Array, -1 * Facing Direction Of(Event Player));
  • Event Player.arr_did_set_item[Event Player.index_of_item_to_set] = True;
  • Global.total_items_count += 1;
  • End;
  • }
  • }
  • rule("gs1 player primary fire")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Global.current_game_state == 1;
  • Event Player.arr_did_set_item[0] == False;
  • Is Button Held(Event Player, Button(Primary Fire)) == True;
  • }
  • actions
  • {
  • Event Player.index_of_item_to_set = 0;
  • Call Subroutine(set_item);
  • }
  • }
  • rule("gs1 player secondary fire")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Global.current_game_state == 1;
  • Event Player.arr_did_set_item[1] == False;
  • Is Button Held(Event Player, Button(Secondary Fire)) == True;
  • }
  • actions
  • {
  • Event Player.index_of_item_to_set = 1;
  • Call Subroutine(set_item);
  • }
  • }
  • rule("deathtrap create")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Count Of(Global.create_que_deathtrap_pos) > 0;
  • }
  • actions
  • {
  • Create Effect(All Players(All Teams), Sphere, Color(Red), Evaluate Once(Last Of(Global.create_que_deathtrap_pos)),
  • Global.deathtrap_radius, Visible To);
  • Modify Global Variable(array_deathtrap_pos, Append To Array, Last Of(Global.create_que_deathtrap_pos));
  • Modify Global Variable(array_deathtrap_id, Append To Array, Last Created Entity);
  • Modify Global Variable(create_que_deathtrap_pos, Remove From Array By Value, Last Of(Global.create_que_deathtrap_pos));
  • Wait(0.016, Ignore Condition);
  • Loop If Condition Is True;
  • }
  • }
  • rule("bounceball_create")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Count Of(Global.create_que_bounceball_pos) > 0;
  • }
  • actions
  • {
  • Create Effect(All Players(All Teams), Sphere, Color(White), Evaluate Once(Last Of(Global.create_que_bounceball_pos)),
  • Global.bounceball_radius, Visible To);
  • Modify Global Variable(array_bounceball_pos, Append To Array, Last Of(Global.create_que_bounceball_pos));
  • Modify Global Variable(array_bounceball_id, Append To Array, Last Created Entity);
  • Modify Global Variable(create_que_bounceball_pos, Remove From Array By Value, Last Of(Global.create_que_bounceball_pos));
  • Wait(0.016, Ignore Condition);
  • Loop If Condition Is True;
  • }
  • }
  • rule("gs2 player goal")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Global.current_game_state == 2;
  • Event Player.did_goal_or_retire == False;
  • Event Player.if_spend_5_sec_after_join_100 == 100;
  • Is On Ground(Event Player) == True;
  • Distance Between(Position Of(Event Player), Global.goal_pos) < Global.goal_radius;
  • }
  • actions
  • {
  • Event Player.did_goal_or_retire = True;
  • Set Status(Event Player, Null, Rooted, 9999);
  • If(Global.number_of_goaled_players == 0);
  • Modify Player Score(Event Player, 6);
  • Else If(Global.number_of_goaled_players < 4);
  • Modify Player Score(Event Player, 5);
  • Else;
  • Modify Player Score(Event Player, 4);
  • End;
  • Global.number_of_goaled_players += 1;
  • Small Message(Event Player, String("{0} -> {1}", Input Binding String(Button(Interact)), Custom String("camera")));
  • }
  • }
  • rule("gs2 all players goal")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Global.current_game_state == 2;
  • Is True For All(All Players(All Teams), Current Array Element.did_goal_or_retire) == True;
  • }
  • actions
  • {
  • Set Match Time(0);
  • }
  • }
  • rule("gs2 end glo")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Global.current_game_state == 2;
  • Match Time == 0;
  • }
  • actions
  • {
  • Set Match Time(3);
  • Wait(0.016, Ignore Condition);
  • Global.current_game_state = 3;
  • Stop Camera(All Players(All Teams));
  • All Players(All Teams).is_using_camera = False;
  • }
  • }
  • rule("gs3 end glo")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Global.current_game_state == 3;
  • Match Time == 0;
  • }
  • actions
  • {
  • Set Match Time(20);
  • Wait(0.016, Ignore Condition);
  • Global.current_game_state = 1;
  • }
  • }
  • rule("gs2 player out of start")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Global.current_game_state == 2;
  • Event Player.did_goal_or_retire == False;
  • Event Player.if_spend_5_sec_after_join_100 == 100;
  • Distance Between(Position Of(Event Player), Global.start_pos) > Global.start_radius;
  • Distance Between(Position Of(Event Player), Global.goal_pos) > Global.goal_radius;
  • }
  • actions
  • {
  • For Player Variable(Event Player, i_collision_loop, 0, Count Of(Global.array_deathtrap_pos), 1);
  • If(Distance Between(Position Of(Event Player), Global.array_deathtrap_pos[Event Player.i_collision_loop])
  • < Global.deathtrap_radius);
  • Kill(Event Player, Null);
  • Event Player.did_goal_or_retire = True;
  • Break;
  • End;
  • End;
  • For Player Variable(Event Player, i_collision_loop, 0, Count Of(Global.array_bounceball_pos), 1);
  • If(Distance Between(Position Of(Event Player), Global.array_bounceball_pos[Event Player.i_collision_loop])
  • < Global.bounceball_radius);
  • Teleport(Event Player, Global.array_bounceball_pos[Event Player.i_collision_loop] + Global.bounceball_radius * Direction Towards(
  • Global.array_bounceball_pos[Event Player.i_collision_loop], Position Of(Event Player)));
  • Apply Impulse(Event Player, Direction Towards(Global.array_bounceball_pos[Event Player.i_collision_loop], Position Of(
  • Event Player)), Speed Of In Direction(Event Player, Direction Towards(Position Of(Event Player),
  • Global.array_bounceball_pos[Event Player.i_collision_loop])), To World, Cancel Contrary Motion);
  • Break;
  • End;
  • End;
  • For Player Variable(Event Player, i_collision_loop, 0, Count Of(Global.array_hydrant_pos), 1);
  • If(Distance Between(Position Of(Event Player), Global.array_hydrant_pos[Event Player.i_collision_loop]) < Global.hydrant_radius);
  • Apply Impulse(Event Player, Global.array_hydrant_direction[Event Player.i_collision_loop], 10, To World, Cancel Contrary Motion);
  • Break;
  • End;
  • End;
  • "hammer"
  • For Player Variable(Event Player, i_collision_loop, 0, Count Of(Global.array_hammer_pos), 1);
  • Event Player.current_direction_hammer_loop = Cosine From Degrees(Global.hammer_theta_current)
  • * Global.array_hammer_std_dir[Event Player.i_collision_loop] + Sine From Degrees(Global.hammer_theta_current) * Cross Product(
  • Global.array_hammer_axis[Event Player.i_collision_loop], Global.array_hammer_std_dir[Event Player.i_collision_loop]);
  • If(Distance Between(Position Of(Event Player),
  • Global.array_hammer_pos[Event Player.i_collision_loop] + Global.hammer_ArmRadius * Event Player.current_direction_hammer_loop)
  • < Global.hammer_head_radius);
  • Apply Impulse(Event Player, Cross Product(Global.array_hammer_axis[Event Player.i_collision_loop],
  • Event Player.current_direction_hammer_loop), 10, To World, Cancel Contrary Motion);
  • Break;
  • End;
  • End;
  • Wait(0.016, Ignore Condition);
  • Loop If Condition Is True;
  • }
  • }
  • rule("hydrant_create")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Count Of(Global.create_que_hydrant_pos) > 0;
  • }
  • actions
  • {
  • Create Effect(All Players(All Teams), Good Aura, Color(Orange), Evaluate Once(Last Of(Global.create_que_hydrant_pos)) + 0.800 * (
  • Total Time Elapsed % 0.700) * Evaluate Once(Last Of(Global.create_que_hydrant_dir)), Global.hydrant_radius,
  • Visible To Position and Radius);
  • disabled Create Effect(All Players(All Teams), Good Aura, Color(Orange), Last Of(Global.create_que_hydrant_pos), Global.hydrant_radius,
  • Visible To);
  • Modify Global Variable(array_hydrant_pos, Append To Array, Last Of(Global.create_que_hydrant_pos));
  • Modify Global Variable(array_hydrant_direction, Append To Array, Last Of(Global.create_que_hydrant_dir));
  • Modify Global Variable(array_hydrant_id, Append To Array, Last Created Entity);
  • Modify Global Variable(create_que_hydrant_pos, Remove From Array By Value, Last Of(Global.create_que_hydrant_pos));
  • Modify Global Variable(create_que_hydrant_dir, Remove From Array By Value, Last Of(Global.create_que_hydrant_dir));
  • Wait(0.016, Ignore Condition);
  • Loop If Condition Is True;
  • }
  • }
  • rule("50 score win")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Score Of(Event Player) >= 50;
  • }
  • actions
  • {
  • Declare Player Victory(Event Player);
  • }
  • }
  • rule("hammer_create")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Count Of(Global.create_que_hammer_pos) > 0;
  • }
  • actions
  • {
  • disabled Create Effect(All Players(All Teams), Good Aura, Color(Orange), Last Of(Global.create_que_hydrant_pos), Global.hydrant_radius,
  • Visible To);
  • Modify Global Variable(array_hammer_pos, Append To Array, Last Of(Global.create_que_hammer_pos));
  • Modify Global Variable(array_hammer_axis, Append To Array, Last Of(Global.create_que_hammer_axis));
  • Modify Global Variable(array_hammer_std_dir, Append To Array, Direction From Angles(Horizontal Angle From Direction(Last Of(
  • Global.array_hammer_axis)), -90 + Vertical Angle From Direction(Last Of(Global.array_hammer_axis))));
  • Create Effect(All Players(All Teams), Sphere, Color(Blue), Evaluate Once(Last Of(Global.array_hammer_pos))
  • + Global.hammer_ArmRadius * (Cosine From Degrees(Global.hammer_theta_current) * Evaluate Once(Last Of(
  • Global.array_hammer_std_dir)) + Sine From Degrees(Global.hammer_theta_current) * Cross Product(Evaluate Once(Last Of(
  • Global.array_hammer_axis)), Evaluate Once(Last Of(Global.array_hammer_std_dir)))), Global.hammer_head_radius,
  • Visible To Position and Radius);
  • Modify Global Variable(array_hammer_id, Append To Array, Last Created Entity);
  • Modify Global Variable(create_que_hammer_pos, Remove From Array By Value, Last Of(Global.create_que_hammer_pos));
  • Modify Global Variable(create_que_hammer_axis, Remove From Array By Value, Last Of(Global.create_que_hammer_axis));
  • Wait(0.016, Ignore Condition);
  • Loop If Condition Is True;
  • }
  • }
  • rule("hammer theta loop")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Is Game In Progress == True;
  • }
  • actions
  • {
  • Global.hammer_theta_current = (Global.hammer_theta_current + 3) % 360;
  • Wait(0.016, Ignore Condition);
  • Loop;
  • }
  • }
  • rule("environmental death")
  • {
  • event
  • {
  • Player Died;
  • All;
  • All;
  • }
  • conditions
  • {
  • Event Was Environment == True;
  • }
  • actions
  • {
  • Teleport(Event Player, Global.start_pos);
  • Resurrect(Event Player);
  • }
  • }
  • rule("use_eraser")
  • {
  • event
  • {
  • Subroutine;
  • use_eraser;
  • }
  • actions
  • {
  • "deathtrap"
  • Event Player.index_of_pos_to_erace = Index Of Array Value(Global.array_deathtrap_pos, First Of(Filtered Array(
  • Global.array_deathtrap_pos, Distance Between(Event Player.abort_use_item_set_pos, Current Array Element)
  • < Global.eraser_radius)));
  • If(Event Player.index_of_pos_to_erace != -1);
  • Play Effect(All Players(All Teams), Good Explosion, Color(White), Global.array_deathtrap_pos[Event Player.index_of_pos_to_erace],
  • 2);
  • Modify Global Variable(array_deathtrap_pos, Remove From Array By Index, Event Player.index_of_pos_to_erace);
  • Destroy Effect(Global.array_deathtrap_id[Event Player.index_of_pos_to_erace]);
  • Modify Global Variable(array_deathtrap_id, Remove From Array By Index, Event Player.index_of_pos_to_erace);
  • Global.total_items_count -= 1;
  • Event Player.arr_did_set_item[Event Player.index_of_item_to_set] = True;
  • End;
  • "blocking ball"
  • Event Player.index_of_pos_to_erace = Index Of Array Value(Global.array_bounceball_pos, First Of(Filtered Array(
  • Global.array_bounceball_pos, Distance Between(Event Player.abort_use_item_set_pos, Current Array Element)
  • < Global.eraser_radius)));
  • If(Event Player.index_of_pos_to_erace != -1);
  • Play Effect(All Players(All Teams), Good Explosion, Color(White), Global.array_bounceball_pos[Event Player.index_of_pos_to_erace],
  • 2);
  • Modify Global Variable(array_bounceball_pos, Remove From Array By Index, Event Player.index_of_pos_to_erace);
  • Destroy Effect(Global.array_bounceball_id[Event Player.index_of_pos_to_erace]);
  • Modify Global Variable(array_bounceball_id, Remove From Array By Index, Event Player.index_of_pos_to_erace);
  • Global.total_items_count -= 1;
  • Event Player.arr_did_set_item[Event Player.index_of_item_to_set] = True;
  • End;
  • "boostpad"
  • Event Player.index_of_pos_to_erace = Index Of Array Value(Global.array_hydrant_pos, First Of(Filtered Array(
  • Global.array_hydrant_pos, Distance Between(Event Player.abort_use_item_set_pos, Current Array Element)
  • < Global.eraser_radius)));
  • If(Event Player.index_of_pos_to_erace != -1);
  • Play Effect(All Players(All Teams), Good Explosion, Color(White), Global.array_hydrant_pos[Event Player.index_of_pos_to_erace], 2);
  • Modify Global Variable(array_hydrant_pos, Remove From Array By Index, Event Player.index_of_pos_to_erace);
  • Modify Global Variable(array_hydrant_direction, Remove From Array By Index, Event Player.index_of_pos_to_erace);
  • Destroy Effect(Global.array_hydrant_id[Event Player.index_of_pos_to_erace]);
  • Modify Global Variable(array_hydrant_id, Remove From Array By Index, Event Player.index_of_pos_to_erace);
  • Global.total_items_count -= 1;
  • Event Player.arr_did_set_item[Event Player.index_of_item_to_set] = True;
  • End;
  • "hammer"
  • Event Player.index_of_pos_to_erace = Index Of Array Value(Global.array_hammer_pos, First Of(Filtered Array(Global.array_hammer_pos,
  • Distance Between(Event Player.abort_use_item_set_pos, Current Array Element) < Global.eraser_radius)));
  • If(Event Player.index_of_pos_to_erace != -1);
  • Play Effect(All Players(All Teams), Good Explosion, Color(White), Global.array_hammer_pos[Event Player.index_of_pos_to_erace], 2);
  • Modify Global Variable(array_hammer_pos, Remove From Array By Index, Event Player.index_of_pos_to_erace);
  • Modify Global Variable(array_hammer_axis, Remove From Array By Index, Event Player.index_of_pos_to_erace);
  • Destroy Effect(Global.array_hammer_id[Event Player.index_of_pos_to_erace]);
  • Modify Global Variable(array_hammer_std_dir, Remove From Array By Index, Event Player.index_of_pos_to_erace);
  • Modify Global Variable(array_hammer_id, Remove From Array By Index, Event Player.index_of_pos_to_erace);
  • Global.total_items_count -= 1;
  • Event Player.arr_did_set_item[Event Player.index_of_item_to_set] = True;
  • End;
  • }
  • }
  • rule("gs2 player afk")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Global.current_game_state == 2;
  • Event Player.did_goal_or_retire == False;
  • Is Moving(Event Player) == False;
  • }
  • actions
  • {
  • Wait(10, Abort When False);
  • Small Message(Event Player, Custom String("No AFK 放置しないで!"));
  • Wait(5, Abort When False);
  • Kill(Event Player, Event Player);
  • Event Player.did_goal_or_retire = True;
  • }
  • }
  • rule("gs2 player interact after goal")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Global.current_game_state == 2;
  • Event Player.did_goal_or_retire == True;
  • Is Alive(Event Player) == True;
  • Is Button Held(Event Player, Button(Interact)) == True;
  • }
  • actions
  • {
  • If(Event Player.is_using_camera);
  • Stop Camera(Event Player);
  • Event Player.is_using_camera = False;
  • Else;
  • Event Player.camera_target_player = Filtered Array(All Living Players(All Teams), !Current Array Element.did_goal_or_retire)[0];
  • Start Camera(Event Player, Eye Position(Event Player.camera_target_player) + -3 * Facing Direction Of(Event Player), Eye Position(
  • Event Player.camera_target_player), 60);
  • Event Player.is_using_camera = True;
  • End;
  • }
  • }
  • rule("gs2 player primary while camera")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Global.current_game_state == 2;
  • Event Player.is_using_camera == True;
  • Is Button Held(Event Player, Button(Primary Fire)) == True;
  • }
  • actions
  • {
  • Event Player.candidates_camera_target = Filtered Array(All Living Players(All Teams), !Current Array Element.did_goal_or_retire);
  • Event Player.camera_target_player = Event Player.candidates_camera_target[(1 + Index Of Array Value(
  • Event Player.candidates_camera_target, Event Player.camera_target_player)) % Count Of(Event Player.candidates_camera_target)];
  • }
  • }
  • rule("gs2 player secondary while camera")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Global.current_game_state == 2;
  • Event Player.is_using_camera == True;
  • Is Button Held(Event Player, Button(Secondary Fire)) == True;
  • }
  • actions
  • {
  • Event Player.candidates_camera_target = Filtered Array(All Living Players(All Teams), !Current Array Element.did_goal_or_retire);
  • Event Player.camera_target_player = Event Player.candidates_camera_target[(-1 + Index Of Array Value(
  • Event Player.candidates_camera_target, Event Player.camera_target_player)) % Count Of(Event Player.candidates_camera_target)];
  • }
  • }
Join the Workshop.codes Discord