Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Question...
Re: Question... [message #466318 is a reply to message #465948] Wed, 18 April 2012 02:31 Go to previous messageGo to previous message
robbyke is currently offline  robbyke
Messages: 348
Registered: September 2010
Location: Belgium
Karma:
Recruit
Whitedragon wrote on Thu, 12 April 2012 00:15

Try something like this.
void MDB_Create_Zone::Created(GameObject *obj) {
	Vector3 Size = Vector3(4.0f,8.0f,2.0f); //Size of the script zone.
	Matrix3 Rotation(true);
	Rotation.Rotate_Z(Commands->Get_Facing(obj)); //Set the rotation of the script zone to the same as the beacon.
	OBBoxClass Box(Commands->Get_Position(obj),Size,Rotation); //Create the bounding box with the position of the beacon, and the size and rotation defined earlier.
	GameObject* Zone = Create_Zone("Script_Zone_All",Box);
	//Attach whatever script you want to the zone now.
}



if you create the zone is the object in the middle or in a corner?

if it is in the middle are X and Y then total length

with the example the object would be at 2 on Y and 4 on Y

or would the zone then be a total of 8 X and 16 Y?


Owner of kambot TT server

kambot.freeforums.org
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: scripts when changing character
Next Topic: C&C Hourglass Amsterdam's Red Light District Progress
Goto Forum:
  


Current Time: Wed Dec 18 21:08:27 MST 2024

Total time taken to generate the page: 0.01105 seconds