Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » XYZ
Re: XYZ [message #330720 is a reply to message #330691] Fri, 16 May 2008 01:58 Go to previous messageGo to previous message
jonwil is currently offline  jonwil
Messages: 3557
Registered: February 2003
Karma:
General (3 Stars)

Do something like this
Vector3 pos;
float angle;
float Distance = whatever distance you want
GameObject *object = the object you want to appear in front of
char *Preset = the preset to create
pos = Commands->Get_Position(object);
angle = Commands->Get_Facing(object);
pos.X+=Distance*(float)cos(angle);
pos.Y+=Distance*(float)sin(angle);
Commands->Create_Object(Preset,pos);

Thats the basics of how to make something appear a certain distance in front of an object


Jonathan Wilson aka Jonwil
Creator and Lead Coder of the Custom scripts.dll
Renegade Engine Guru
Creator and Lead Coder of TT.DLL
Official member of Tiberian Technologies
 
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
Read Message
Read Message
Read Message
Previous Topic: I need help for JBserv
Next Topic: MuzzleA0
Goto Forum:
  


Current Time: Sun Jan 26 16:14:57 MST 2025

Total time taken to generate the page: 0.01001 seconds