Jump to content

Scripting Brush Movement


Recommended Posts

I'm saying that the player/projectiles likely won't be able to collide with the bottles but I get the impression that this isn't an issue?

 

Nah.. not going to be much of an issue. I mean really, how many saber hits can people take in these games yet in the movies they are dead from one hit. There is a bit of suspended disbelief in gaming because you really can't make it 100% real.

 

All I want is to make bottles move along a conveyor belt path like a bottling line. Then, loose bottles go into one "machine" and the other end will spit them out say on a cardboard tray that then goes to another "machine" and then they come out the other end as a case of beer. It'll show the player a working process. 

That is more important.

Link to comment

Yeah, you should be able to do that with a misc_model_breakable. The "breakable" part is optional, there's actually several surprising cases where these types of entities are placed (the switches on the sandcrawler in t1_surprise, for instance)

Link to comment

ok, I tried @Boothand's method for getting an md3 to work. As simple as it looks, I cannot get this to work. I don't who chimes in on this I just want an answer.. how the hell do I set this up?

 

I made a brush, made it a function static. Does it matter what size?

Then I added a Key: model2 and a value: models/map_objects/doom/heater.md3

 

This is just a test so I used to heater model. This won't appear in a testmap. What am I doing wrong here?

Link to comment

 https://dl.dropboxusercontent.com/u/58757568/beerbottle.MD3

 

Ok, after testing this myself some more, here are the instructions:

 

  1. Make a caulk brush, and shape it roughly how you want the collision to be. Use a non-solid caulk if you don't want collision at all.
  2. Inside this caulk brush, make a small square brush and put system/origin on it. The bottle's pivot point is on the bottom, and the pivot point will be aligned with the origin brush.
  3. With both selected, make them into a func_static.
  4. Set the value of model2 to the path of the model, but always be sure to use / slashes like you did, instead of \.

 

A little hitch is that once the pivot point is off-cam, the whole model disappears. This might be the behavior of misc_model_static and other models that aren't baked into geometry? @@eezstreet?

 

For bottles it shouldn't be that noticable though.

The reason why you didn't see the heater model was probably because it spawned somewhere else, thus the need for an origin brush.

Link to comment

 https://dl.dropboxusercontent.com/u/58757568/beerbottle.MD3

 

Ok, after testing this myself some more, here are the instructions:

 

  1. Make a caulk brush, and shape it roughly how you want the collision to be. Use a non-solid caulk if you don't want collision at all.
  2. Inside this caulk brush, make a small square brush and put system/origin on it. The bottle's pivot point is on the bottom, and the pivot point will be aligned with the origin brush.
  3. With both selected, make them into a func_static.
  4. Set the value of model2 to the path of the model, but always be sure to use / slashes like you did, instead of \.

 

A little hitch is that once the pivot point is off-cam, the whole model disappears. This might be the behavior of misc_model_static and other models that aren't baked into geometry? @@eezstreet?

 

For bottles it shouldn't be that noticable though.

The reason why you didn't see the heater model was probably because it spawned somewhere else, thus the need for an origin brush.

 

K, i'm going to try this out and hopefully it'll work with this method. 

 

Link to comment

 https://dl.dropboxusercontent.com/u/58757568/beerbottle.MD3

 

Ok, after testing this myself some more, here are the instructions:

 

  1. Make a caulk brush, and shape it roughly how you want the collision to be. Use a non-solid caulk if you don't want collision at all.
  2. Inside this caulk brush, make a small square brush and put system/origin on it. The bottle's pivot point is on the bottom, and the pivot point will be aligned with the origin brush.
  3. With both selected, make them into a func_static.
  4. Set the value of model2 to the path of the model, but always be sure to use / slashes like you did, instead of \.

 

A little hitch is that once the pivot point is off-cam, the whole model disappears. This might be the behavior of misc_model_static and other models that aren't baked into geometry? @@eezstreet?

 

For bottles it shouldn't be that noticable though.

The reason why you didn't see the heater model was probably because it spawned somewhere else, thus the need for an origin b

 

 https://dl.dropboxusercontent.com/u/58757568/beerbottle.MD3

 

Ok, after testing this myself some more, here are the instructions:

 

  1. Make a caulk brush, and shape it roughly how you want the collision to be. Use a non-solid caulk if you don't want collision at all.
  2. Inside this caulk brush, make a small square brush and put system/origin on it. The bottle's pivot point is on the bottom, and the pivot point will be aligned with the origin brush.
  3. With both selected, make them into a func_static.
  4. Set the value of model2 to the path of the model, but always be sure to use / slashes like you did, instead of \.

 

A little hitch is that once the pivot point is off-cam, the whole model disappears. This might be the behavior of misc_model_static and other models that aren't baked into geometry? @@eezstreet?

 

For bottles it shouldn't be that noticable though.

The reason why you didn't see the heater model was probably because it spawned somewhere else, thus the need for an origin brush.

 

 

 

 

 

I've gotten the model to load properly in the game but it is not textured.  I'm assuming the path is models/beerbottle/beerbottle.md3 correct?

 

I assumed you knew I didn't have a base folder under models, but, I did try that path as well. base/models/beerbottle/beerbottle.md3 

Neither worked

 

I also took the beer bottle texture from the ASE model and included it within the folder but its still the textureless model. In the texture paths did you underscore anything?

Link to comment

models/map_objects/beerbottle/beerbottle.md3

 

The compiler doesn't expect the base/models path, but only starting from models/etc. It would probably be more natural to put the beerbottle model in some folder where you keep all of your custom ones, but that's up to you, if you're happy the way it works now :)

 

Also, I recommend customizing/re-texturing the bottle logo, and scale it down to 512 x 512 when you're done.

Link to comment

models/map_objects/beerbottle/beerbottle.md3

 

The compiler doesn't expect the base/models path, but only starting from models/etc. It would probably be more natural to put the beerbottle model in some folder where you keep all of your custom ones, but that's up to you, if you're happy the way it works now :)

 

Also, I recommend customizing/re-texturing the bottle logo, and scale it down to 512 x 512 when you're done.

 

 

This is all working well.

 

Still having issues with getting the bottle to appear in the map as a func_static.  Could you send me your test mapfile or I could send you mine and we can see where this is all screwed up?

Link to comment

This is all working well.

 

Still having issues with getting the bottle to appear in the map as a func_static.  Could you send me your test mapfile or I could send you mine and we can see where this is all screwed up?

 

If you send yours, or a portion of it, that would be nice!

Link to comment
  • 4 weeks later...

Well, to finally close this up @Boothand figured out what I did wrong and we got this aquared away over a month ago. However, it wasn't until today that I actually got around to testing this out with real, in game structure. I copy and pasted the top portion of my conveyor belt into a test map and was really pleased that I was able to make a completely clean run all through. Didn't hit any walls with the model. Took a few compiles to get the ref_tags to the correct height, but, I have what I wanted. I can now move brushes in game which will be the boxes and pallets of beer and now I can move individual bottles as well!

 

Now I just have to figure out how to get the speed even across all sections of the conveyor belt. Darn math...  :mad:  

 

Thanks for all the help.

 

path_zpsb1fe0434.jpg

Boothand and therfiles like this
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...