so in my newest game I need it to give the player a random type when they respawn
Types
Light
Healer
Heavy
Normal
Random “classes” or smth?
So you need help with a randomizer?
You can alter things from here:
yes Preformatted text
Each time they respawn they get a new role? Or just roles at the start of the game?
each time the respawn and at the start of the game
Why would you want them to switch roles each time they respawn? (just a bit curious)
it for my fighting game. it just a mix of improved Streak Savers and Snowbrawl but with powers for me and my friends to play because we cant play discovery until 4pm
Here’s the code:
Set variable "var" | Random integer (1) to (4)
If [var] ≠[team number] then
Broadcast message on channel | var
Else
Broadcast message on channel | Recursion channel
Team switchers receive 1, 2, 3, 4 and switch player to that team, respectively. The recursion channel makes sure they aren’t on the same team. That channel retriggers the trigger so it runs the code again.
ok thanks for the code should this go In a trigger
Sure! Just make sure it is linked to a lifecycle for when player is knocked out!
what device should recursion channel go in and were
It should go in the “trigger when receiving on” channel slot in the trigger that runs the block code.
and what about var channel
In the team switchers. “Switch when receiving on”
This topic was automatically closed 3 hours after the last reply. New replies are no longer allowed.