Re: spwaners code [message #354450 is a reply to message #354350] |
Wed, 15 October 2008 08:27 |
|
Jerad2142
Messages: 3811 Registered: July 2006 Location: USA
Karma:
|
General (3 Stars) |
|
|
snazy2000 wrote on Tue, 14 October 2008 11:51 | i have made this code bt it dont work in game
GameObject *dave = Commands->Create_Object("Invisible_Object", position);
Commands->Attach_To_Object_Bone(dave, obj, "GDI Spawner");
}
|
I could be wrong but I don't remember any object in the presets that goes by the name of "Invisible_Object" but in any case, you are attaching this "Invisible_Object" to the person that said the chat message I assume, notice, you are attaching this newly created object to a bone named "GDI Spawner"...
Commands->Attach_To_Object_Bone(dave, obj, "GDI Spawner");
My guess is that this line is pretty much useless unless you want the "Invisible_Object" to be stuck to the speaker's origin. Also, look through the presets list and choose an object that you want this script to create, then replace "Invisible_Object" with this new preset name, you can also remove that attach to bone line of code, it will spawn at the position you are finding fine if you do.
Visit Jerad's deer sweat shop
|
|
|