[COD 1] Script_model and Misc_model

Have a question about modding, modelling or skinning? Have a tutorial to post? Post here!

Moderator: Core Staff

Post Reply
ThaWalrus

[COD 1] Script_model and Misc_model

Post by ThaWalrus » January 12th, 2012, 10:58 am

Hi CJ,

At CoD 1, i am mapping a bit, but I have some kind of problem.
It is possible to inport models to radiant, they are located in the xmodel folder. Also, most models have collmaps(model with playerclips). The problem is, when I want to, for example, move an entity that is a Misc_model, it cant be moved. If its a script_model, however, it can be moved. I face two problems here:

1. Modelscale doesnt work at script_model.
2. Model is non-collidable.

I was wondering if its possible to create a entity, which can be moved, scaled and non-collidable.

Thanks in advance! (or not)

Greetz TW :lol:

megazor
CJ Worshipper
CJ Worshipper
Posts: 414
Joined: July 22nd, 2009, 3:02 am
Location: Russia, Vladivostok

Re: [COD 1] Script_model and Misc_model

Post by megazor » January 13th, 2012, 8:07 am

I was wondering if its possible to create a entity, which can be moved, scaled and non-collidable
No. go xfire, naab :)

ThaWalrus

Re: [COD 1] Script_model and Misc_model

Post by ThaWalrus » January 13th, 2012, 3:36 pm

[13:54] mеgazor: misc_model is static
[13:54] mеgazor: a decoration
[13:54] mеgazor: script_model refers to SCRIPTING
[13:54] mеgazor: u can play with it by scripting
[13:54] mеgazor: but ye, u cant change its size in radiant
[13:55] mеgazor: and its non colliding

So, a misc_model is really a static decoration thats compiled within the map...

With script_model its impossible to change the size I noticed, but you can indeed play with it in certain ways.
There is actually no need for putting a script_model in your map, since you can spawn("script_model", origin).

I was wondering if you could create a box or something inside it that is non-collidable. Like a 16x16x16 box, I found the function "setContents()" but I cant figure out how to use it...

Are there more things you can change to a script_model within a script? Like setting the model, origin, movement etc?

Thx for the help already!

TW :lol:

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Re: [COD 1] Script_model and Misc_model

Post by Drofder2004 » January 13th, 2012, 8:42 pm

You cannot spawn solid objects and "setcontents" works in some versions of CoD but it is limited use and does not give an accurate clip of the item.
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

megazor
CJ Worshipper
CJ Worshipper
Posts: 414
Joined: July 22nd, 2009, 3:02 am
Location: Russia, Vladivostok

Re: [COD 1] Script_model and Misc_model

Post by megazor » January 14th, 2012, 3:13 am

I found the function "setContents()" but I cant figure out how to use it...
This is how it works:

Code: Select all

scriptmodel setContents(1);
It doesnt matter what model(a car, a box, a tree) is bound to the 'scriptmodel' - this function will always create the same small clip box, about 16x16x16. If you want larger clipping, you will have to spawn more script_model's

ThaWalrus

Re: [COD 1] Script_model and Misc_model

Post by ThaWalrus » January 18th, 2012, 9:36 pm

@megazorro

Is it possible to resize this 'box', or get some other sort of clip box?

Btw, i cant get it to work, this setContents(1). The 1 means its true?

Zeroy

It says it returns something?

megazor
CJ Worshipper
CJ Worshipper
Posts: 414
Joined: July 22nd, 2009, 3:02 am
Location: Russia, Vladivostok

Re: [COD 1] Script_model and Misc_model

Post by megazor » January 19th, 2012, 3:45 am

setContents(1) creates a solid box. 1 means "dear script, please give me a box!"
setContents(0) removes it.

Post Reply

Who is online

Users browsing this forum: No registered users and 16 guests