Moving vehicles in MP tut ?
Moderator: Core Staff
-
- Core Staff
- Posts: 2155
- Joined: December 7th, 2004, 2:07 am
- Location: Netherlands
- Contact:
Moving vehicles in MP tut ?
Is it at all possible to make a movable jeep (model jeep).
I read the post regarding the rollercoaster but I can't figure it out.
Searched around for a tut but can only find the SP tut.
I read the post regarding the rollercoaster but I can't figure it out.
Searched around for a tut but can only find the SP tut.
You can make it move just like you can a brushmodel, if thats all you're trying to do. You just need to add the model as a script_model and give it a targetname. I think theres at least 1 tutorial on scripting objects to move on here.
Watch this before posting a question: http://www.albinoblacksheep.com/flash/posting.php
-
- Core Staff
- Posts: 14220
- Joined: October 21st, 2004, 7:17 pm
- Location: Holland
- Contact:
-
- Core Staff
- Posts: 2155
- Joined: December 7th, 2004, 2:07 am
- Location: Netherlands
- Contact:
-
- Core Staff
- Posts: 2155
- Joined: December 7th, 2004, 2:07 am
- Location: Netherlands
- Contact:
Ok, I made a movable truck. But you can walk through it. I made it a script_model instead of a script_brushmodel, cause script_brushmodel doesn't work on models like a car (I think).
Any suggestions on how to make the truck solid (not with clip around it I mean)
p.s. When you place the same truckmodel in a map it's solid. (just standing in a map, not moving I mean)
Any suggestions on how to make the truck solid (not with clip around it I mean)
p.s. When you place the same truckmodel in a map it's solid. (just standing in a map, not moving I mean)
-
- CJ Worshipper
- Posts: 383
- Joined: December 16th, 2005, 6:38 pm
KS is correct, but to do it even better its better to make a array of the clips and vehicle, you can do this by giving them the same targetname, only a little change to the code.
Instead of vehicle = getent ...... use this:
Offcourse change the name to somewhat else.
Now the game will see the clips and the boat was 1 object so they will nicely move the same. KS way is also possible but this is just a bit cleaner code to use.[/code]
Instead of vehicle = getent ...... use this:
Code: Select all
vehicle = getentarray("vehicle","targetname");
for (i=0 ; i < vehicle.size; i++)
Now the game will see the clips and the boat was 1 object so they will nicely move the same. KS way is also possible but this is just a bit cleaner code to use.[/code]
If you want multiple vehicles moving in differen't directions, speeds and distances, that won't work. Would be easier to just link the clips to the vehicles with
Code: Select all
clip linkto(vehicle);
Watch this before posting a question: http://www.albinoblacksheep.com/flash/posting.php
-
- Core Staff
- Posts: 2155
- Joined: December 7th, 2004, 2:07 am
- Location: Netherlands
- Contact:
-
- CJ Worshipper
- Posts: 383
- Joined: December 16th, 2005, 6:38 pm
Well i'm not saying it won't work, just that generally you would use an array for things that do the same thing. I guess you could do it like that with a defined speed, and target each vehicle. But it depends what he wants to do with them.
Watch this before posting a question: http://www.albinoblacksheep.com/flash/posting.php
-
- Core Staff
- Posts: 13315
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Who is online
Users browsing this forum: No registered users and 3 guests