Game Development Community

How do i load a new mission from script?

by Snaggz · in Torque Game Engine · 05/28/2006 (1:07 am) · 3 replies

Im working making a turn based rpg. i want to load a new mission on collision on an enemy. This is what I put in and the game crashes:

function MyBot::onCollision(%this, %obj, %col)
{
loadMission("~/data/missions/fight.mis");
return;
}

#1
05/28/2006 (1:19 am)
It has to be on the client and you are calling it on the server
#2
05/28/2006 (1:48 am)
Thanks for the quick response. However i put that is client like so...

function clientCmdLoadFight(
{
loadMission("~/data/missions/fight.mis");
}

and it just says waiting for server when it starts to load the mission. what am i doing wrong?
#3
05/28/2006 (3:54 am)
Try this

schedule(0,0,loadMission,"~/data/missions/fight.mis");

Edit: this would do the same thing as clientCmdLoadFight, didnt read that post very good first time :P