Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » OBBoxClass
OBBoxClass [message #278537] Sun, 12 August 2007 06:03 Go to next message
Hex is currently offline  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. Razz

[Updated on: Sun, 12 August 2007 06:13]

Report message to a moderator

Re: OBBoxClass [message #278544 is a reply to message #278537] Sun, 12 August 2007 06:41 Go to previous messageGo to next message
Sn1per74* is currently offline  Sn1per74*
Messages: 939
Registered: April 2006
Karma: 0
Colonel
Maybe the characters feet aren't touching the script zone?

http://i4.photobucket.com/albums/y133/FMAROCKS/sniper74halosigsnipedontforgettogiv.png
Creator: AoBFrost
Re: OBBoxClass [message #278546 is a reply to message #278537] Sun, 12 August 2007 06:48 Go to previous messageGo to next message
Hex is currently offline  Hex
Messages: 858
Registered: March 2004
Karma: 0
Colonel
No, its not that I tried using Pos.Z = 1; before to make the zone higher

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. Razz
Re: OBBoxClass [message #278547 is a reply to message #278537] Sun, 12 August 2007 06:53 Go to previous messageGo to next message
Sniperhid is currently offline  Sniperhid
Messages: 6
Registered: February 2007
Karma: 0
Recruit
From what i can see you didn't Register the Script.

Include this line in the .cpp file:
ScriptRegistrant<HillCamp_Zone> HillCamp_Zone_Registrant("HillCamp_Zone","");

[Updated on: Sun, 12 August 2007 06:57]

Report message to a moderator

Re: OBBoxClass [message #278552 is a reply to message #278547] Sun, 12 August 2007 07:39 Go to previous messageGo to next message
Hex is currently offline  Hex
Messages: 858
Registered: March 2004
Karma: 0
Colonel
No, I just forgot to post that here

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. Razz
Re: OBBoxClass [message #278560 is a reply to message #278546] Sun, 12 August 2007 08:55 Go to previous messageGo to next message
Sn1per74* is currently offline  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.


http://i4.photobucket.com/albums/y133/FMAROCKS/sniper74halosigsnipedontforgettogiv.png
Creator: AoBFrost
Re: OBBoxClass [message #278566 is a reply to message #278537] Sun, 12 August 2007 09:50 Go to previous message
Hex is currently offline  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. Razz
Previous Topic: Fake Buildings
Next Topic: Refinery money
Goto Forum:
  


Current Time: Thu Jul 04 06:23:45 MST 2024

Total time taken to generate the page: 0.00662 seconds