This forum is locked and will eventually go offline. If you have feedback to share you can find us in our Discord channel "MythoLogic Interactive" https://discord.gg/nECKnbT7gk

Forum rules

Is there a gameover script?

Here you can find answered ScriptAPI topics.
Forum rules
By using the forum you agree to the following rules.
Locked
User avatar
Scraper
Fighter
Fighter
Posts: 22
Joined: Tue Nov 01, 2016 9:06 am
SFD Account: Scrapper
SFD Alias: Scrapper
Started SFD: PreAlpha 1.7.1
Gender:

Is there a gameover script?

Post by Scraper » Tue May 30, 2017 10:21 pm

Hi, I just made a deathrun-like map where you respawn instantly.
However, for some reason the /gameover script doesn't work.

This is the script for the gameover

Code: Select all

public void gameover(TriggerArgs args)
{
Game.SetGameOver("Congratulations!");
}
So, I made a Button00 and made it's Object Id =gameover, but when I press it, the game won't end. Is there something wrong in the script?

Here is the WHOLE script : https://pastebin.com/H7ZnHPHN
Last edited by KliPeH on Wed May 31, 2017 1:03 pm, edited 1 time in total.
Reason: Merged a double post.
0 x

Hoang Marcel
Superfighter
Superfighter
Posts: 62
Joined: Sun Mar 20, 2016 3:40 am
Title: Custom map lover
Started SFD: PreAlpha 1.6.4
Location: Vietnam
Gender:

Post by Hoang Marcel » Wed May 31, 2017 11:11 am

The script works fine, you have to put gameover in ScriptMethod not ObjectID.
0 x

User avatar
Scraper
Fighter
Fighter
Posts: 22
Joined: Tue Nov 01, 2016 9:06 am
SFD Account: Scrapper
SFD Alias: Scrapper
Started SFD: PreAlpha 1.7.1
Gender:

Post by Scraper » Wed May 31, 2017 12:16 pm

Oh, thanks.
0 x

Locked