Jump to content

Scripting Brush Movement


Recommended Posts

Posted

In the ICARUS manual it says that the MOVE command will make a brush move from one set or coordinates to a second set of coordinates. So, I make a conveyor belt and a cargo container. I script the cargo container to from point A to point B. This is fine for a straight shot.

 

Say I have an "L" shaped conveyor belt. Would I use a second MOVE command for next set of coordinates that I want to container to go to ?

Posted

You can use as many move commands as you like, and yes you'd need to add move commands for new vectors. Just make sure they execute after the previous one has finished, instead of all at once. You can use dowait for that.

Posted

It might be easier to use a func_train depending on how your conveyer belt is laid out.

 

This may be a faster way to go. I didn't really think of the func_train. I could basically use Rich's tutorial and just invert the train to be in the Z axis. If my train travels outside the void for example, would that cause any problems? 

Posted

This may be a faster way to go. I didn't really think of the func_train. I could basically use Rich's tutorial and just invert the train to be in the Z axis. If my train travels outside the void for example, would that cause any problems? 

As long as the individual path_corners and the func_train starting position are not in the void, then no, you're fine. Raven (and others) got away with this in several places by putting the path_corners inside of a brush which was in the void.

Posted

For automathic floating platform, use func_bobbing. :D Func train and path corner for make a platform or brush that follow a path. func:_door can be applied to a platform, too, but for little squared movement. it's good just for a moving block. 

Posted

::Ahemm... cough, cough::

 

For very complex 3D paths you can also use a .ROF file (created by using my ROFF exporter for 3dsMax). My ROFF WIP thread provides an old tutorial as well as a link to where you can download the 30-day trial of 3dsMax6, 7, or 8. :winkthumb:

Boothand likes this
Posted

- convert the brushes, including an origin brush into a func_static

- create ref_tags as points for the func_static to move along

- set up a targetname for each ref_tag so you can call them via script

- set up a script_targetname for the func_static

- create your script like so (this is a very basic script that just operates the func_static and has an infinite loop):

 

fyprfk.jpg

 

- create a trigger brush that is targeted to a target_scriptrunner

- add usescript to your target_scriptrunner with the path and file name (minus the extension) of your script

Asgarath83 and Archangel35757 like this
  • 4 months later...
Posted

- convert the brushes, including an origin brush into a func_static

- create ref_tags as points for the func_static to move along

- set up a targetname for each ref_tag so you can call them via script

- set up a script_targetname for the func_static

- create your script like so (this is a very basic script that just operates the func_static and has an infinite loop):

 

fyprfk.jpg

 

- create a trigger brush that is targeted to a target_scriptrunner

- add usescript to your target_scriptrunner with the path and file name (minus the extension) of your script

 

 

Sorry its been a while but I'm actually at this point in the project now. Would this method also work for models as well or does it only work with brushes?

Posted

@@IrocJeff in Kor1 map jaden can move some MD3 korriban sith statue with the force push for open a stairscale for lower catacombs. i suggest you to check map and scripts of that part.

 

I don't have Jedi Acadamy. i DID download the demo and deleted it before finishing it was so bad... however....

 

I poked around Artus_Topside scripts and remembered there were TIE Fighters flying all over the place and they were models. Here is one of those scripts.

 

affect ( "tie1", 56 )
{
 
task ( "fly_south5" )
{
move ( $tag( "fly_south5", 54)$, 0.000 );
}
 
 
task ( "fly_south" )
{
play ( "PLAY_ROFF", "roff/yavin_south" );
}
 
use ( "south5_fx" );
wait ( 1250.000 );
use ( "south5_fx" );
wait ( 750.000 );
rotate ( < 0.000 270.000 0.000 >, 0.000 );
 
affect ( "kyle", 55 )
{
sound ( CHAN_AUTO, "sound/test/tiepass2.wav" );
}
 
do ( "fly_south5" );
wait ( "fly_south5" );
do ( "fly_south" );
wait ( "fly_south" );
}
 
TIE 1 more than likely refers to the md3 model. I'm just curious what the tag would refer to? Would that be the targetname of a ref_tag? 
Posted

Why you not decompile the map and see how is work? i think need an md3 model, a ref_tag and a roff file. however , in that case. the korriban statue not need the roff files. maybe tomorrow i can check for you the kor1 map.

;)

Posted

 

affect ( "tie1", 56 )

{
 
task ( "fly_south5" )
{
move ( $tag( "fly_south5", 54)$, 0.000 );
}
 
 
 
I'm just curious what the tag would refer to? Would that be the targetname of a ref_tag? 

 

 

Yeah that's correct. The tag holds a vector, so the script refers to that XYZ position.

Posted

Yeah that's correct. The tag holds a vector, so the script refers to that XYZ position.

 

Let me ask you this in regards to the MOVE statement or whatever it is. Of the two in BEHAVED, which one do I use? Also, how the heck do I set it up ?? I am able to get the tag and my "point1" in there but I'm having a problem understanding what the 54, $, and 0.0000 settings are to get it to look like the Raven script are.

 

If you see below this is what my move thingy looks like in Devaheb. What am I setting up wrong in here compared to the Raven MOVE line? 

 

move ( $tag( "point1", ORIGIN)$, < 0.000 0.000 0.000 >, 0000.000 );
Posted

Honestly, I'm not sure what the numbers 56 and 54 etc mean. Maybe @@therfiles has a clue?

 

At least you've done it correct for moving an object to a tag. Use the uppermost "move" for that (<vec>, <vec>, <float>)

Posted

Honestly, I'm not sure what the numbers 56 and 54 etc mean. Maybe @@therfiles has a clue?

 

At least you've done it correct for moving an object to a tag. Use the uppermost "move" for that (<vec>, <vec>, <float>)

 

The only issue is that my model doesn't move !  :(

 

I've got DT85's tutorial to work fine for brushes, which is great. In fact, I can take the pallet model out and make my own for the large pallets and use that method on the conveyor belt.

 

I WANT to use your bottle or the wine bottle from the map objects to make a bottling line like you'd see in any bottler plant. Not as jammed up or anything like in real life, but, just to give the sense that the player is in a living facility. I can have everything "shut off" and it just sits there stationary. It'll look good, but, moving would be better.

Posted

I uploaded a .ROF file exporter for 3dsMax 6,7,8... so you can create complex 3D path animation for your Origin brush and export the 3dsMax origin brush to .ROF for use in scripting complex brush movements (or if you want a "baked" physics animation for brushes).

 

I don't think anyone has even attempted to use it yet.

Posted

The only issue is that my model doesn't move !  :(

 

I've got DT85's tutorial to work fine for brushes, which is great. In fact, I can take the pallet model out and make my own for the large pallets and use that method on the conveyor belt.

 

I WANT to use your bottle or the wine bottle from the map objects to make a bottling line like you'd see in any bottler plant. Not as jammed up or anything like in real life, but, just to give the sense that the player is in a living facility. I can have everything "shut off" and it just sits there stationary. It'll look good, but, moving would be better.

 

I'll test if I can get models to move via scripts. But one thing you could try - make a caulk brush func_static and set its model2 value to the path of the model. The description says "md3 model to also draw", so if it doesn't work with the .ase bottle, try a default assets .md3 model to see if that works. In which case, I'll export .md3 of that bottle (and about 10x smaller :P)

 

Edit: Can confirm that it works, but only with md3. I'll give you a .md3 beerbottle, but to keep your assets clean, you'd have to tell me which folder path in the models folder you prefer me to export to, as that's the folder path you'll have to place the textures in.

eezstreet likes this
Posted

I uploaded a .ROF file exporter for 3dsMax 6,7,8... so you can create complex 3D path animation for your Origin brush and export the 3dsMax origin brush to .ROF for use in scripting complex brush movements (or if you want a "baked" physics animation for brushes).

 

I don't think anyone has even attempted to use it yet.

 

Well, how would I go about creating a path in 3dsmax in the first place? 

Posted

You can use a misc_model_breakable with scripted movement. The small 1x1 box on it indicates the origin. You may run into issues with collision however.

Posted

I'll test if I can get models to move via scripts. But one thing you could try - make a caulk brush func_static and set its model2 value to the path of the model. The description says "md3 model to also draw", so if it doesn't work with the .ase bottle, try a default assets .md3 model to see if that works. In which case, I'll export .md3 of that bottle (and about 10x smaller :P)

 

Edit: Can confirm that it works, but only with md3. I'll give you a .md3 beerbottle, but to keep your assets clean, you'd have to tell me which folder path in the models folder you prefer me to export to, as that's the folder path you'll have to place the textures in.

 

 

I'd probably just put it under base/models/beerbottle for a directory would be fine with me. 

 

Ya know, if you made the bottle the size of the bottle in Nar Shaddaa map objects  or close abouts that would be good. Its a wine bottle but it'll work for what I want to do.

 

Thanks for the help. I'll try and test this out later on when I have time. 

eezstreet likes this
Posted

You can use a misc_model_breakable with scripted movement. The small 1x1 box on it indicates the origin. You may run into issues with collision however.

 

Not sure what you mean by collision but I'm probably not going to make them breakable.

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...