I'm trying to make a zone 30x60x20, it creates the zone but its small and the edited never gets triggered
Any idea whats wrong?
class HillCamp_Zone : public ScriptImpClass {
void Entered(GameObject *obj,GameObject *enter);
void Exited(GameObject *obj,GameObject *exit);
};
class Test : public ChatCommandClass {
void Triggered(int ID,const TokenClass &Text,int ChatType) {
char Msg[256];
GameObject *obj = Get_GameObj(ID);
Vector3 Pos = Commands->Get_Position(obj);
Vector3 newzoneposSizes;
newzoneposSizes.X = 30.0f;
newzoneposSizes.Y = 15.0f;
newzoneposSizes.Z = 10.0f;
OBBoxClass Box;
Box.Center = Pos;
Box.Extent = newzoneposSizes;
GameObject *Zone = Create_Zone("Script_Zone_All",Box);
Commands->Attach_Script(Zone,"HillCamp_Zone","");
sprintf(Msg,"ppage %d test zone made",ID);
Console_Input(Msg);
}
};
ChatCommandRegistrant<Test> TestReg("!t",CHATTYPE_ALL,0,GAMEMODE_AOW);
void HillCamp_Zone::Entered(GameObject *obj,GameObject *enter) {
char Msg[256];
sprintf(Msg,"msg %s entered the zone.",Commands->Get_Preset_Name(enter));
Console_Input(Msg);
}
void HillCamp_Zone::Exited(GameObject *obj,GameObject *exit) {
char Msg[256];
sprintf(Msg,"msg %s exited the zone.",Commands->Get_Preset_Name(exit));
Console_Input(Msg);
}
[Updated on: Sun, 12 August 2007 06:13]
Report message to a moderator