Spawn Object

Discuss thaw modding, post your own, share your ideas, ask questions.
Lezzer
Posts: 48
Joined: Tue Jan 04, 2011 10:50 am
Contact:

Spawn Object

Postby Lezzer » Wed Feb 16, 2011 1:38 pm

Help me. How to make so that the model near the player was created?? :cry: :cry: :cry: :cry:
sMo0g™
Posts: 108
Joined: Fri Nov 20, 2009 1:20 pm
Location: Ukraine
Contact:

Re: Spawn Object

Postby sMo0g™ » Wed Feb 16, 2011 4:20 pm

Read qb files and use brain.
Morten1337
Posts: 132
Joined: Tue Jun 08, 2010 11:11 pm
Contact:

Re: Spawn Object

Postby Morten1337 » Wed Feb 16, 2011 7:03 pm

Lezzer wrote:Help me. How to make so that the model near the player was created?? :cry: :cry: :cry: :cry:

Code: Select all

CreateCompositeObject
sMo0g™
Posts: 108
Joined: Fri Nov 20, 2009 1:20 pm
Location: Ukraine
Contact:

Re: Spawn Object

Postby sMo0g™ » Wed Feb 16, 2011 10:34 pm

Yes, use

Code: Select all

CreateCompositeObject
and set global pos script.
Like this:

Code: Select all

:i $skater$.$Obj_GetPosition$
:i $new_pos$ = (%GLOBAL%$pos$ + %vec3(0.000,0.000,0.000))
:i $your_model_id$.call $Obj_SetPosition$ arguments
$position$ = %GLOBAL%$new_pos$
Morten1337
Posts: 132
Joined: Tue Jun 08, 2010 11:11 pm
Contact:

Re: Spawn Object

Postby Morten1337 » Thu Feb 17, 2011 8:34 am

use params when you're setting the position.

Code: Select all

:i $skater$.$Obj_GetPosition$

            :i $CreateCompositeObject$ :s{
               :i $Components$ =
               :i :a{
                  *components here*
               :i :a}
            :i $params$ = :s{$pos$ = %GLOBAL%$pos$:s}
            :i :s}

polak
Posts: 23
Joined: Fri Mar 04, 2011 8:37 pm
Contact:

Re: Spawn Object

Postby polak » Wed Mar 09, 2011 8:43 pm

i's doeasn't working : :cry:
Morten1337
Posts: 132
Joined: Tue Jun 08, 2010 11:11 pm
Contact:

Re: Spawn Object

Postby Morten1337 » Thu Mar 10, 2011 11:19 pm

polak wrote:i's doeasn't working : :cry:

it's the only way
sindrom
Posts: 32
Joined: Thu Oct 15, 2009 8:33 am
Contact:

Re: Spawn Object

Postby sindrom » Sat Mar 19, 2011 6:50 pm

Can I use UnpausePhysics for objects to do it tangible?
Morten1337
Posts: 132
Joined: Tue Jun 08, 2010 11:11 pm
Contact:

Re: Spawn Object

Postby Morten1337 » Sun Mar 20, 2011 8:21 pm

sindrom wrote:Can I use UnpausePhysics for objects to do it tangible?

no. if you mean "bouncing" objects you need to add the rigidbody parameter, and use

Code: Select all

   :i *object id*.$RigidBody_Wake$
to make the collision kick in.
polak
Posts: 23
Joined: Fri Mar 04, 2011 8:37 pm
Contact:

Re: Spawn Object

Postby polak » Sun Mar 20, 2011 8:55 pm

file wasn't compiled....
quazz
Posts: 185
Joined: Sat May 01, 2010 5:57 pm
Contact:

Re: Spawn Object

Postby quazz » Sun Mar 20, 2011 9:04 pm

You should learn how to make simpler scripts first in order to better your knowledge on how scripts work, making a menu etc, before you jump to something of such proportions.
polak
Posts: 23
Joined: Fri Mar 04, 2011 8:37 pm
Contact:

Re: Spawn Object

Postby polak » Sun Apr 24, 2011 6:39 pm

where is error (i wanna wpawn near skater)
...............................................
:i $CreateCompositeObject$:s{
:i $Components$ =
:i :a{
:i :s{$Component$ = $Motion$:s}
:i :s{$Component$ = $LockObj$:s}
:i :s{$Component$ = $rigidbody$:s}

:i :s{$Component$ = call $model$ arguments
$model$ = %GLOBAL%$model$:s}
:i :a}
:i $params$ = :s{$pos$ = %GLOBAL%$pos$:s}

:i $params$ = :s{$name$ = %GLOBAL%$mangled_id$:s}
:i :s}
:i %GLOBAL%$mangled_id$.call $Obj_LockToObject$ arguments
$ObjectName$ = %GLOBAL%$name$%vec3(-60.000000,0.000000,0.000000)
:i call $MangleChecksums$ arguments
$a$ = %GLOBAL%$name$$b$ = $marker_cone2$
:i $CreateCompositeObject$:s{
:i $Components$ =
:i :a{
:i :s{$Component$ = $Motion$:s}
:i :s{$Component$ = $LockObj$:s}
:i :s{$Component$ = $rigidbody$:s}
:i :s{$Component$ = call $model$ arguments
$model$ = %GLOBAL%$model$:s}
:i :a}
:i $params$ = :s{$pos$ = %GLOBAL%$pos$:s}

:i $params$ = :s{$name$ = %GLOBAL%$mangled_id$:s}
:i :s}
:i %GLOBAL%$mangled_id$.call $Obj_LockToObject$ arguments
$ObjectName$ = %GLOBAL%$name$%vec3(60.000000,0.000000,0.000000)
Lezzer
Posts: 48
Joined: Tue Jan 04, 2011 10:50 am
Contact:

Re: Spawn Object

Postby Lezzer » Sun Apr 24, 2011 8:22 pm

polak thanks for a code but this spawn at me already is.
At present it would be necessary for me that the model was created near the player and at movement of the player the model moved together with it.
polak
Posts: 23
Joined: Fri Mar 04, 2011 8:37 pm
Contact:

Re: Spawn Object

Postby polak » Sun Apr 24, 2011 8:58 pm

its no all script
polak
Posts: 23
Joined: Fri Mar 04, 2011 8:37 pm
Contact:

Re: Spawn Object

Postby polak » Mon Apr 25, 2011 3:28 pm

ok i done .
i replace params

Return to “THAW modding”

Who is online

Users browsing this forum: No registered users and 95 guests