Static Model into script_object ?

Post your scripting questions / solutions here

Moderator: Moderators

User avatar
Kalti
Major
Posts: 325
Joined: Sun Mar 16, 2003 11:46 am
Contact:

Static Model into script_object ?

Post by Kalti »

Lo... I was wondering if someone would take the time and explain how I can use a model in combination with a script.

I've tried making the model a script_object but mohr keeps stating that the entity was not created (Entity NOT created, brushes not all from world)... choosing script_model gives me the same statement.

Now I must be totally unaware of the way to do this properly, so please shed some light on this for me :wink:

Thanks,

Kalti
Image
User avatar
Axion
Major General
Posts: 683
Joined: Mon Sep 29, 2003 5:14 am
Location: Northern California
Contact:

Post by Axion »

If I understood you correctly-

Make a script_object, and then in then entity dialogue box, give the key of model and the value of the actual .tik file to get what you want.
"The work of a thousand years is nothing but rubble."
- Dr. Carl Goerdeler (1943)
Visit my mapping site: http://www.freewebs.com/axion9
Image
User avatar
Kalti
Major
Posts: 325
Joined: Sun Mar 16, 2003 11:46 am
Contact:

Post by Kalti »

That did it ! thank you :D
Image
User avatar
Kalti
Major
Posts: 325
Joined: Sun Mar 16, 2003 11:46 am
Contact:

Post by Kalti »

Btw. does this affect my modelmap ? I used woodclip for the modelmap and now I've made it all into a script_object the wood sound isn't there anymore and the modelmap seems different ingame...
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

Script_model

Post by tltrude »

Try changing the classname from script_object to script_model. But, I'm not sure that will fix it.
Tom Trude,

Image
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

whats wrong with using the regular entity as-is? just assign a targetname and do whatever you want with it.
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
User avatar
Kalti
Major
Posts: 325
Joined: Sun Mar 16, 2003 11:46 am
Contact:

Post by Kalti »

Thanks tltrude, I'll give that a shot

Lizardkid, I'm still a beginner as it comes to scripting and therefor have no idea how to implement the entity with a script just by it's targetname...
Image
User avatar
Kalti
Major
Posts: 325
Joined: Sun Mar 16, 2003 11:46 am
Contact:

Post by Kalti »

turning it into a script_model gives the same result... no sound and no proper modelmap...

Lizardkid, you where saying ?
Image
Green Beret
Major General
Posts: 746
Joined: Mon Apr 19, 2004 12:21 pm
Contact:

Post by Green Beret »

lizardkid wrote:whats wrong with using the regular entity as-is? just assign a targetname and do whatever you want with it.
i tried this b4 and only certain entity's would work?
so i just make them script_object's or model's :(
Image
User avatar
Kalti
Major
Posts: 325
Joined: Sun Mar 16, 2003 11:46 am
Contact:

Post by Kalti »

lizardkid wrote:whats wrong with using the regular entity as-is? just assign a targetname and do whatever you want with it.
I see... just the script the entity by it's targetname, instead of using the script_object or script_model...

I'm using a script from the Alsace map by VonderCrunch. In the Alsace map it uses a script_object and no model it's all brushes.

Code: Select all

$boat1 thread boat 
$boat2 thread boat
* Placed in the map.scr below the "level waitTill prespawn" and before the "level waittill spawn"
* Number of boat threads depending on the number of boats you want to rock independently


The following should be place in the map.scr below level waittil spawn and is the actual rocking script:

Code: Select all

//**********boat animation to rock the boat*************
boat:
while (1)
{
self time 4
self rotateyup 4
self rotatezup 4
self rotatexdown 2
self waitmove
self time 4
self rotateydown 4
self rotatezdown 4
self rotatexup 2
self waitmove
self time 4
self rotateydown 4
self rotatezdown 4
self rotatexup 3
self waitmove
self time 4
self rotateyup 4
self rotatezup 4
self rotatexdown 3
self waitmove
}
end
However my targetnamed entity simply doesn't work...
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

hmmm

Post by tltrude »

Well, you said it was working before except for the model map. But, I don't think you are using a .map for the clip brushes. If they are just clip brushes around each boat, make them a seperate script_object entity and give them names like "boat1_clip". Then bind them to thier boat under prespawn.

$boat1_clip bind $boat1
$boat2_clip bind $boat2

After doing that, they will move when thier boat moves.

BTW, you only need to set "time" once, if it does not need to change. So, you could set it in prespawn and remove all those time line.

$boat1 time 4
$boat2 time 4

I have never been able to move an object on all three axis at the same time--with one move or waitmove command. So, your boats are probably only moving on two axis.
Tom Trude,

Image
User avatar
Kalti
Major
Posts: 325
Joined: Sun Mar 16, 2003 11:46 am
Contact:

Post by Kalti »

I am using a modelmap... although I've tried it without the modelmap and just using the clipbrushes the way you mentioned... but still no go.

When I place the model and give it a targetname the boat won't rock with the script I posted earlier. The modelmap is is working fine.

When using a script_object or a script_model (with key and value of the boatmodel) the size of the entities 'bounding box' exceeds the size of the clipbrushes and of the modelmap... but the boat does rock.

So I think this will never work the way I had hoped for...

* EDIT: I think the boat does move along 3 different axis.
Image
Green Beret
Major General
Posts: 746
Joined: Mon Apr 19, 2004 12:21 pm
Contact:

Post by Green Beret »

what are your targetnames?
say u made one boat_bomb

you would control it in the script like so

Code: Select all

$boat_bomb moveto $way1
//there is more code involved to make it move,this is just a example
$boat_bomb would be the targetname of a bomb(or whatever)
$way1 would be the targetname of a info>waypoint

make sure your .bsp and .scr have the same name :wink:
if you still cant figure it out,i can make a small tut map and post it with a .map inside 8-)
Image
Master-Of-Fungus-Foo-D
Muffin Man
Posts: 1544
Joined: Tue Jan 27, 2004 12:33 am
Location: cali, United States

Post by Master-Of-Fungus-Foo-D »

why odnt you just make a nonsolid script object/model and place the clips around the boat?
Image
The Fungus Theme song!!!

Code: Select all

while (local.player istouching self)
User avatar
Kalti
Major
Posts: 325
Joined: Sun Mar 16, 2003 11:46 am
Contact:

Post by Kalti »

Master-Of-Fungus-Foo-D wrote:why odnt you just make a nonsolid script object/model and place the clips around the boat?
omg... that's it !

Image

* EDIT: Just set the script_object to non-solid :oops:
Image
Post Reply