Game Development Community

Unable to find function PlayerData::Create

by Thomas Bang · in Torque 3D Professional · 02/15/2011 (10:04 am) · 2 replies

Hi

I created a datablock (PlayerData). Then i want to create a player (Library->Scripted) and the console says me "unable to find function PlayerData::Create".

Any hints?

By the way: Also Torsion did not found "PlayerData::Create".

#1
02/15/2011 (10:19 am)
To make a test, i wrote into the console these instructions as one line

function PlayerData::Create($db, $obj) { $id=new Player() { position = "1000 60 250"; datablock = $db; }; MissionGroup.add($id); }

It worked.

Side note: I hate it to make the homework of GG!!!
#2
02/15/2011 (10:44 am)
Directly call:
spawnObject(%spawnClass, %spawnDatablock, "", "", "");