Page 1 of 2
Static Model into script_object ?
Posted: Wed Jan 19, 2005 9:54 pm
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
Thanks,
Kalti
Posted: Wed Jan 19, 2005 10:29 pm
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.
Posted: Wed Jan 19, 2005 10:59 pm
by Kalti
That did it ! thank you

Posted: Wed Jan 19, 2005 11:17 pm
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...
Script_model
Posted: Wed Jan 19, 2005 11:27 pm
by tltrude
Try changing the classname from script_object to script_model. But, I'm not sure that will fix it.
Posted: Thu Jan 20, 2005 3:35 am
by lizardkid
whats wrong with using the regular entity as-is? just assign a targetname and do whatever you want with it.
Posted: Thu Jan 20, 2005 8:17 am
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...
Posted: Thu Jan 20, 2005 10:53 am
by Kalti
turning it into a script_model gives the same result... no sound and no proper modelmap...
Lizardkid, you where saying ?
Posted: Thu Jan 20, 2005 2:19 pm
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

Posted: Thu Jan 20, 2005 3:14 pm
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...
hmmm
Posted: Thu Jan 20, 2005 5:43 pm
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.
Posted: Thu Jan 20, 2005 7:33 pm
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.
Posted: Thu Jan 20, 2005 8:04 pm
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
if you still cant figure it out,i can make a small tut map and post it with a .map inside

Posted: Thu Jan 20, 2005 8:57 pm
by Master-Of-Fungus-Foo-D
why odnt you just make a nonsolid script object/model and place the clips around the boat?
Posted: Thu Jan 20, 2005 9:09 pm
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 !
* EDIT: Just set the script_object to non-solid
