top of page
Character to Ball Conversion
Scripting Explained
Ball Pick Up Object
The Bill Pick-Up Item is a custom design. The sphere material, swirling particles, and the vertical ribbon line are original creations. I pulled the circular effect under the ball from a purchased asset.
As soon as an actor overlaps the pick-up, a reference to that actor is sent to the Game Mode using an interface
As soon as an actor overlaps the pick-up, a reference to that actor is sent to the Game Mode using an interface
Game Mode tells player controller to become a ball
The Game Mode receives the reference to the overlapping pawn, checks to see that it is a BP_Character_Master, and gets a reference to that class with a cast. I then get the controller and call an interface implemented on the Player Controllers. The interface event tells that players controller to run Spawn Ball Remove Player.
Player Controller converting from a character to a ball
Before I destroy the current character pawn, I grab its transform for the Spawn Actor (ball) event.
From there, I destroy the weapon first. It's had issues not destroying with the character actor it is owned by. Likely a check box somewhere, but this has been working.
Then I run an event only on the owning player to create a flash on the screen and switch the HUD from the Character hud to the ball HUD.
The Spawn Actor event is called, and we receive a class reference to spawn from the Game Mode.
I grab a reference to the new Ball actor, and then the player's controller possesses it.
I also pass the Team the player is on to the ball class onto the ball.
From there, I destroy the weapon first. It's had issues not destroying with the character actor it is owned by. Likely a check box somewhere, but this has been working.
Then I run an event only on the owning player to create a flash on the screen and switch the HUD from the Character hud to the ball HUD.
The Spawn Actor event is called, and we receive a class reference to spawn from the Game Mode.
I grab a reference to the new Ball actor, and then the player's controller possesses it.
I also pass the Team the player is on to the ball class onto the ball.
bottom of page