Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Get nearest building to an object? (How to get the nearest building to a gameobject)
Get nearest building to an object? [message #467681] Tue, 22 May 2012 05:42 Go to next message
BillieJoe67 is currently offline  BillieJoe67
Messages: 35
Registered: March 2012
Karma: 0
Recruit
Is there a function in scripts.dll that finds the nearest building to a gameobject?

If not, would the function in OnOeS work with 4.0 without too much editing?

EDIT: ignore this, I've just found it

[Updated on: Tue, 22 May 2012 06:00]

Report message to a moderator

Re: Get nearest building to an object? [message #467685 is a reply to message #467681] Tue, 22 May 2012 06:33 Go to previous messageGo to next message
iRANian is currently offline  iRANian
Messages: 4299
Registered: April 2011
Karma: 0
General (4 Stars)
Commands->Find_Nearest_Building(GameObject*) should work.

Long time and well respected Renegade community member, programmer, modder and tester.

Scripts 4.0 private beta tester since May 2011.

My Renegade server plugins releases
Re: Get nearest building to an object? [message #467873 is a reply to message #467685] Thu, 24 May 2012 07:16 Go to previous messageGo to next message
Jerad2142 is currently offline  Jerad2142
Messages: 3805
Registered: July 2006
Location: USA
Karma: 6
General (3 Stars)
iRANian wrote on Tue, 22 May 2012 07:33

Commands->Find_Nearest_Building(GameObject*) should work.


Does that get it by the controller or by the mesh? I assume it gets it by the controller, which could be incorrect if someone didn't put the controllers on the buildings themselves, or if you're standing on the far end of the airstrip runway.


Re: Get nearest building to an object? [message #467874 is a reply to message #467681] Thu, 24 May 2012 07:37 Go to previous message
iRANian is currently offline  iRANian
Messages: 4299
Registered: April 2011
Karma: 0
General (4 Stars)
controller, iirc the engine refers to it as a building's poly.

Long time and well respected Renegade community member, programmer, modder and tester.

Scripts 4.0 private beta tester since May 2011.

My Renegade server plugins releases
Previous Topic: Can the SP maps be played in MP?
Next Topic: Random map Rotation???
Goto Forum:
  


Current Time: Fri May 17 01:05:49 MST 2024

Total time taken to generate the page: 0.00640 seconds