PDA

View Full Version : Bobbing models



Torq53
October 13th, 2014, 15:22
Hi,

In the map I am working on I have installed a couple of row boats. I made them larger using modelscale etc. After making them bob by following a tutorial, they have reverted back to their original size. Does anyone know how I can make the bigger. Here is the script if it helps...

main()
{
thread bobbing_think();
}

bobbing_think()
{
obj1 = getent("bobbing_obj","targetname"); //get the script_model entity
obj2 = getent("bobbing_obj2","targetname"); //get the other script_model entity

wait randomfloat(1.5); //generate a random number of seconds between bobs

org1 = (3497, 1379, 965); //define origin or location of your boat/script_model
org2 = (2932, 1208, 965); //define origin or location of your boat/script_model
timer = 1; //bobbing speed - higher number = slower bobbing

for(;;)
{
obj1 moveto (org1 + (0,0,2), timer, timer * 0.5, timer * 0.5); // 2 is num. of units to go over Orig.
obj2 moveto (org2 + (0,0,-1), timer, timer * 0.5, timer * 0.5);
wait timer;
obj1 moveto (org1 + (0,0,-2), timer, timer * 0.5, timer * 0.5); // 2 is num. of units to go over Orig.
obj2 moveto (org2 + (0,0,1), timer, timer * 0.5, timer * 0.5);
wait timer;
}
}

{OSG}Brodie
October 13th, 2014, 18:30
you cant use model scale once you have made the model a script model.
the only way to do it is to export the model in maya and make it larger there then run it back through asset manager

load the model into maya bind the model to its origin. set colour and vertex colour then select the origin only and set scale according to the size you want for the origin export to cod4 then compile into cod4

might be an idea to rename the larger model accordingly as well ie boat_lrg if you wish to maintain your original models size

you dont need to redo the materials either enjoy

if you cant do it send me the raw model or let me know the model name in cod4 and ill see to it as soon as i get the chance but decorating home atm lol.

shouldnt take me to long though tbh ;)

Torq53
October 15th, 2014, 05:59
Hi Brodie,

Thanks for the info. I have read about this Maya being used. I'm not sure how to do it but I'll give it a go first, then if it doesn't work perhaps you will do it for me.


Regards

{OSG}Brodie
October 15th, 2014, 07:21
no worries bud commendable and yea ill sort it for you if needs be

Torq53
October 16th, 2014, 15:48
Hi Broadie,
I downloaded a trial copy of Maya, but it just would not load the model. I saved it as .mel and it recognised it and loaded it, but there was nothing there after the load. Anyway, it suddenly occurred to me that the row boat should be to scale and that I shouldn't have to rescale the thing. After moving an actor to the location I realised that I had created the l"and of the giants" at the end of my map. So looks like problem solved.

On a different matter, I was wondering if you know if it is possible to import a weapon into the mod. We are using a basic version of ow2 which I downloaded from here. The reason being, it runs all the maps we like with no problems. However, one of the guys misses his Famas and keeps banging on about it. I thought it would be nice to shut him up...lol