Page 1 of 1

Can't spawn my character

Posted: 27 May 2013, 19:44
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 ?

Re: Can't spawn my character

Posted: 27 May 2013, 19:58
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

Re: Can't spawn my character

Posted: 27 May 2013, 20:58
by Kyb
Oh thx