MM2 Mechanics Help

I’m going to keep this one open just incase I need more help so I don’t have to make another topic- but let’s get to the point. How do you make a “Time Survived” Popup only for the part of the game and after the game and all the players are there it shows a popup with the name of the murderer and sheriff and gives u XP for time survived. If anyone knows, help would be appreciated! (Im going AFK so I’ll check everything later! Thanks!)

ignored lol… sad :frowning: ima be afk fr now

Make a property called “timesurvived”
Take a counter.
Take a repeater.
Set the repeater task interval to 1.0 seconds.
Set “Perform task on Start” to “No”
Lets say that a channel called “startgame” starts the game.
Make the repeater activate upon “startgame”, and deactivate on “endgame”.
Wire repeater to the counter (or use channels):
“Repeater runs task” → “Increment Counter”
For the counter, make it update the property “timesurvived”

Part 2:
Add an item granter. Make it grant whatever your XP currency is.
Add a block for “when recieving on channel”
Set the channel to “endgame”
Block code:
Grant Custom Amount
Amount: get property: “timesurvived”

Add a popup.
Add a block for “when recieving on channel”
Set the channel to “endgame”
Block code:
Set Header: Player Roles
Set Content: Create text with:
:

updating popup block code soon

2 Likes

Oooh, thanks! thank u for responding-- :slight_smile:

Assume that you have stored the names of the sheriff and murderer. (tell me if u didnt do this yet)
Block code:
Set Header: Player Role Results
Set Content: Create Text with: get property: sheriffname
: was the sheriff!
: get property: murderername
: was the murderer!

I haven’t done it yet.

How do I know to get sherriff name? I think I haven’t stored the names yet, @Pika_Pokemon , can you tell me how?

do you have a sheriff random selecting system?

1 Like

No, I just have like a popup that shows which you are. Speaking of that, is there any way it could like ‘flicker’ the names? Like how it picks the role in-game?

You mean the popups or the player names in-game?

For thepopups, you can make them open and close to create a “flicker” effect.

If you’re talking about flickering the player’s names in-game, you’ll need a whole lot of coordinate systems and textboxes.

1 Like

I meant the popups. Do you know how to make it so it stores the names of the sheriff and murderer like @Pika_Pokemon said to do? (ima be afk after this so ill check later, thanks!)

Can you help me make the sheriff random selecting system, @Pika_Pokemon ? (ill be offline so if u see this, post the answer and ill check it later) ty!

i cant rn. i will do it soon tho

1 Like

Alright, thank you, @Pika_Pokemon ! Ur help is appreciated :slight_smile:

Do you guys need a sprint button? For added warfare advantages?

Here’s the link.

(How to Make A Sprint Mechanic that Uses Energy)

1 Like

hold on. ran into some problems while figuring out how to do this. currently debugging those problems

1 Like

alr thanks for all ur doing, @Pika_Pokemon !

ummm. idk why gimkit forums are making some stuff italic/bold

Step 1: creating a name storing system
Find your spawn pad (the pad where players spawn in the game, not pre-game)
Place a trigger on top of the spawn pad
Trigger settings:
Set “Visible In-Game” to “No”
Set “Max Triggers” to “1”

Make a property called “playername”
Set the scope to “player”
Property type should be “text”
make another property called “justanumber”
Scope should be “global” for this one
Property type should be “number”
Set the default value for “justanumber” to “1”
make a third property called “playerID”
Scope should be “player” for this one
Property type should be “number”

In the trigger, create a block
Block Code:
Set Property: “playername”
Value : Triggering Player’s Name
Set Property: “playerID”
Value : Get Property: “justanumber”
Set Property: “justanumber”
Value : (Get Property: “justanumber” [ + ] 1)

Step 2: randomizing players for the sheriff/murderer roles
Lets say that the game starts on the channel “gamestart”

Add another property called “randomID”
Make its scope “global”

Make a property called “sheriffID” with global scope and “number” storage.
Make a property called “murdererID” with global scope and “number” storage.

Add a trigger that triggers on “gamestart”
Set “Visible In-Game” to “no”
Set “Trigger on Player Collision” to “no”
Create a block
Block Code:
First, create a variable called “ID”

Set “ID”: (Get Property: “justanumber” [ - ] 1)
Set Property: “sheriffID”
Value_______: (Random Integer from “1” to “ID”)
If (Get Property: “playerID” [ = ] Get Property: “sheriffID”)
Do: Broadcast on channel: sheriff
Set Property: “sheriffID”
Value
: Get Property: “playername”
Else if (Get Property: “playerID” [ > ] Get Property: “sheriffID”)
Do: Set Property: “playerID”
Value
__: Get Property: “playerID” [ - ] 1

Set “ID”: (Get Property: “justanumber” [ - ] 2)
Set Property: “murdererID”
Value_______: (Random Integer from “1” to “ID”)
If (Get Property: “playerID” [ = ] Get Property: “murdererID”)
Do: Broadcast on channel: murderer
_Set Property: “murdererID”
Value
: Get Property: “playername”
Else: Broadcast on channel: innocent

Now make a sheriff system that activates on the channel “sheriff”, a murderer system activating on “murderer” and a normal innocent system activating on “innocent”

Step 3: Showing end game results

Remember the popup in my previous post?

if you dont, well place a popup
Add a block for “when recieving on channel”
set the channel to “endgame”

Block code:

If (Get Property: “playerID” [ = ] Get Property: “sheriffID”)
Do: Set
Set Header: Player Roles
Set Content: Create Text with: Get Property: “sheriffID”
_____________________________: was the sheriff.
_____________________________: Get Property: “murdererID”
_____________________________: was the murderer.

You’re done!
Phew. That was a lotta work
Thanks for reading!

2 Likes

I’ll try this when I have the time. Thank you, @Pika_Pokemon !

This topic was automatically closed 3 hours after the last reply. New replies are no longer allowed.