Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- variables
- {
- player:
- 0: BAL_LOQ
- 1: BAL_POS
- 2: HOR_NML
- 3: VRT_NML
- 4: BAL_ENT
- 5: WAL_NML
- 6: HOR_VEL
- }
- rule("DE/MAKE BALL")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Is Button Held(Event Player, Interact) == True;
- }
- actions
- {
- Skip If(Event Player.BAL_LOQ == True, 5);
- Event Player.BAL_LOQ = True;
- Event Player.BAL_POS = Eye Position(Event Player) + Facing Direction Of(Event Player) * Vector(3, 1, 3);
- Create Effect(All Players(All Teams), Sphere, Orange, Event Player.BAL_POS, 0.500, Visible To Position and Radius);
- Event Player.BAL_ENT = Last Created Entity;
- Skip(5);
- Event Player.BAL_LOQ = False;
- Destroy Effect(Event Player.BAL_ENT);
- Stop Chasing Player Variable(Event Player, BAL_POS);
- Stop Chasing Player Variable(Event Player, VRT_NML);
- Stop Chasing Player Variable(Event Player, HOR_VEL);
- }
- }
- rule("MELEE")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- (Distance Between(Eye Position(Event Player), Event Player.BAL_POS) <= 2 || Distance Between(Position Of(Event Player),
- Event Player.BAL_POS) <= 2) == True;
- Is Button Held(Event Player, Melee) == True;
- Event Player.BAL_LOQ == True;
- }
- actions
- {
- Event Player.VRT_NML = Vector(0, 0, 0);
- Event Player.HOR_NML = Facing Direction Of(Event Player);
- Event Player.HOR_VEL = 20;
- Chase Player Variable At Rate(Event Player, BAL_POS,
- Event Player.BAL_POS + Event Player.VRT_NML + Event Player.HOR_NML * Event Player.HOR_VEL,
- Event Player.HOR_VEL / 2 + Absolute Value(Y Component Of(Event Player.VRT_NML)), Destination and Rate);
- Chase Player Variable At Rate(Event Player, HOR_VEL, 0, 5, Destination and Rate);
- Chase Player Variable At Rate(Event Player, VRT_NML, Vector(0, -10000, 0), 15, Destination and Rate);
- }
- }
- rule("BOUNCE")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Event Player.BAL_LOQ == True;
- Distance Between(Event Player.BAL_POS, Ray Cast Hit Position(Event Player.BAL_POS, Event Player.BAL_POS + (
- Event Player.HOR_NML * Event Player.HOR_VEL + Event Player.VRT_NML) * 250, Null, All Players(All Teams), False)) <= 0.500;
- }
- actions
- {
- Event Player.WAL_NML = Ray Cast Hit Normal(Event Player.BAL_POS, Event Player.BAL_POS + Event Player.HOR_NML * 250, Null,
- All Players(All Teams), False);
- Event Player.HOR_NML = Event Player.HOR_NML - 2 * Event Player.WAL_NML * (X Component Of(Event Player.HOR_NML) * X Component Of(
- Event Player.WAL_NML) + Y Component Of(Event Player.HOR_NML) * Y Component Of(Event Player.WAL_NML) + Z Component Of(
- Event Player.HOR_NML) * Z Component Of(Event Player.WAL_NML));
- Skip If(Distance Between(Event Player.BAL_POS, Ray Cast Hit Position(Event Player.BAL_POS, Event Player.BAL_POS - Vector(0, 250,
- 0), Null, All Players(All Teams), False)) > 0.500, 1);
- Event Player.VRT_NML *= Vector(0, -0.600, 0);
- Skip If(Event Player.HOR_VEL > 0 || Absolute Value(Y Component Of(Event Player.VRT_NML)) > 0.250, 2);
- Event Player.VRT_NML = Vector(0, 0, 0);
- Stop Chasing Player Variable(Event Player, VRT_NML);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement