Can't spawn my character

You can talk about ManiaScript for ManiaPlanet here

Moderator: English Moderator

Post Reply
User avatar
Kyb
Posts: 383
Joined: 18 Aug 2011, 20:50

Can't spawn my character

Post by Kyb »

Hi

I just started to interest to the ManiaScript, and I met my first problem, I try to spawn my character.

Code: Select all

#Extends "Modes/ShootMania/ModeBase.Script.txt"

#Const	CompatibleMapTypes	"SquadArena"
#Const	Version				"a0.1 (2013-05-27)"
#Const	ScriptName			"Squad.Script.txt"

#Include "MathLib" as MathLib
#Include "TextLib" as TextLib
#Include "Libs/Nadeo/ShootMania/SM.Script.txt" as SM


***StartServer***
***
	log("Squad.Script.txt loaded!");
	log("Version: "^Version);
	
	// Set mode options
	UseClans				= True;
	MB_UseSectionRound		= True;
***

***StartRound***
***
	declare CSmBlockSpawn[Integer] ClanSpawnAnchors = [1=>SM::GetSpawn("SpawnA", 0), 2=>SM::GetSpawn("SpawnB", 0)];

	foreach (Player in Players) {
		Player.ArmorMax = 3;
		//SM::SetPlayerWeapon(Player, 1, True);	
		SM::SpawnPlayer(Player, Player.RequestedClan, Player.ArmorMax, ClanSpawnAnchors[Player.RequestedClan], Now);
	}
***

Void Tmp() {}
Any Idea of what i'm doing wrong ?
User avatar
steeffeen
Translator
Translator
Posts: 2463
Joined: 14 Oct 2012, 16:22
Location: Germany

Re: Can't spawn my character

Post by steeffeen »

try to set

Code: Select all

StartTime = Now;
before spawning the players

i recommend looking into the Melee script for the first steps
    Game Mode and Title Pack Creator, Developer, ShootMania-Player & more

    ManiaControl, FancyManiaLinks
    User avatar
    Kyb
    Posts: 383
    Joined: 18 Aug 2011, 20:50

    Re: Can't spawn my character

    Post by Kyb »

    Oh thx
    Post Reply

    Return to “ManiaScript”

    Who is online

    Users browsing this forum: No registered users and 2 guests