e-mods.net

Nod Engine SDK => Scripting and Modifying => Topic started by: Shapeshifter878 on 2015-01-15, 06:55:50

Title: CreateThing method
Post by: Shapeshifter878 on 2015-01-15, 06:55:50
Wondering a few things about the CreateThing method in CodexWorld.java.

Code: [Select]
CreateThing(String templateName, float origin[], float orient[]);
I suppose "origin" and "orient" is the X,Y,Z and Pitch, Yaw, Roll values for objects in Things and templates in Embrace?

I have yet to find the method in the SP scripts so I think I need an explanation of how to send the creation numbers properly to the float[] origin and float[] orient arrays.

Code: [Select]
CodexWorld.CreateThing("Zombu", xxx, xxx);
Thanks.



Title: Re: CreateThing method
Post by: Javokis on 2015-01-15, 09:15:40
We don't use that command. We use SpawnThing or SpawnThingNear from the CodexThing class... hence why you can't find CreateThing.

https://e-mods.net/nodsdk/CodexDocs/CodexThing.html#SpawnThing(java.lang.String) (https://e-mods.net/nodsdk/CodexDocs/CodexThing.html#SpawnThing(java.lang.String))

When you search "SpawnThing" in the project scripts, you'll see much more examples of its use.