Dear forum users! In compliance with the new European GDPR regulations, we'd just like to inform you that if you have an account, your email address is stored in our database. We do not share your information with third parties, and your email address and password are encrypted for security reasons.

New to the forum? Say hello in this topic! Also make sure to read the 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.
Post Reply
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

Post Reply