OBBoxClass [message #278537] |
Sun, 12 August 2007 06:03 |
|
Hex
Messages: 858 Registered: March 2004
Karma: 0
|
Colonel |
|
|
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);
}
goztow wrote on Tue, 11 May 2010 08:00 | If we had to ban all who ever cheated or ever created a cheat (obj3cts and such) then I don't think there would be many members left here (sad fact).
|
reborn wrote on Fri, 29 January 2010 23:37 | std is for pro's.
|
[Updated on: Sun, 12 August 2007 06:13] Report message to a moderator
|
|
|
|
|
|
|
Re: OBBoxClass [message #278560 is a reply to message #278546] |
Sun, 12 August 2007 08:55 |
Sn1per74*
Messages: 939 Registered: April 2006
Karma: 0
|
Colonel |
|
|
Hex wrote on Sun, 12 August 2007 08:48 | No, its not that I tried using Pos.Z = 1; before to make the zone higher
|
To trigger the script zone the player's feet have to touch it. The Z at 1 would make it above his feet. Trying making it at 0 or try jumping up into it if it's at 1.
Creator: AoBFrost
|
|
|
Re: OBBoxClass [message #278566 is a reply to message #278537] |
Sun, 12 August 2007 09:50 |
|
Hex
Messages: 858 Registered: March 2004
Karma: 0
|
Colonel |
|
|
The ground level is set by the bottom of the player
goztow wrote on Tue, 11 May 2010 08:00 | If we had to ban all who ever cheated or ever created a cheat (obj3cts and such) then I don't think there would be many members left here (sad fact).
|
reborn wrote on Fri, 29 January 2010 23:37 | std is for pro's.
|
|
|
|