Page 1 of 1

turning a model

Posted: Wed May 12, 2004 12:00 am
by agentmad007
hi ,

i made my model with milkshape

i give it the key/value targetname:spinring.

then in my script i called the command :

Code: Select all


$spinring rotatex 50

nothing happen???? Here someone told me that model could be turned via script .
So my question is how maybe there is another comand .

thanks

Posted: Wed May 12, 2004 12:19 am
by diego
You have to use a "$" when accessing target names from a script.

use:

key: $targetname (instead of targetname)
value: spinring

Posted: Wed May 12, 2004 12:21 am
by blue60007
You do? I never do (well sometimes) maybe that's why some of my scripts don't work. :oops:

Posted: Wed May 12, 2004 12:23 am
by agentmad007
i tried to turn it via script model(brushes not model) it work fine , and my tagername was:spinring and not $spinring.....dont thing this could change something but i ll try

thx

Posted: Wed May 12, 2004 12:34 am
by agentmad007
dont work :(
damn ........

Posted: Wed May 12, 2004 12:45 am
by tltrude
Key: targetname
Value: spinring

Is fine.

If you use this:

Key: $targetname
Value: spinring

Then the targetname will stay with it when it is copied in the map. Normally, when you copy an entity, it gets a name like t1 t2 t3 etc... But, that symbol will keep the oringial's targetname.

You will have to give your model a classname of script_model or script_object to get it to spin.

Posted: Wed May 12, 2004 12:46 am
by hogleg
I don't think you can spin a model, never tried. :oops:

Posted: Wed May 12, 2004 12:51 am
by agentmad007
well, thx tom i will try ....i tried once to select the model and right clik to convert it in script_model but it said failed to create entity

i will try to select the model type n and changing the class_name in this window directly

Posted: Wed May 12, 2004 1:05 am
by agentmad007
well with classname script_object dont manage to make it turn :/

someone have an idea ?

model

Posted: Wed May 12, 2004 1:11 am
by tltrude
Try classname "script_model". This is not in the tik file, only in the map. You may have a problem with your tik file, I don't know.

Posted: Wed May 12, 2004 1:16 am
by agentmad007
i tried even with script_model it dont work

tiki file is here

Code: Select all


TIKI
setup
{
	scale 0.520000			// Set default scale to 16/30.5 since world is in 16 units per foot and model is in cm's
	path models/milkshape/spinring
	skelmodel spinring.skb
      surface gate shader spinring_gate
}

animations
{
	idle     spinring.skc
}

/*QUAKED milkshape_spinring (0.5 0.0 0.5) (-74 -3 -75) (75 2 74)
*/

dont know why that tiki file would lead me in trouble ?

thx .....

Posted: Wed May 12, 2004 1:20 am
by agentmad007
ok its done i managed i just confused my old bsp with the new :p hehe