Author Topic: How Do You Script?  (Read 3023 times)

Can someone please help me on how to modify the Jeep's script to make it a 2 seater and change the shape from Jeep to Porsche 911???????


Can someone please help me on how to modify the Jeep's script to make it a 2 seater and change the shape from Jeep to Porsche 911???????



With magic???????

This forum is for you to get help with your own code, not for requesting other people to do things.

ROFL

I was like, alright, two seater isn't too hard. Then I continued and lost my stuff when he said change the shape to a Carrera. As if it was as easy as %jeep.shape = porsche.911;

Easy. Just open the console, and type these two commands:

  • makeNewVehicle(Porche, 911);
  • crash(); (simulates the crash animations for the newly created vehicle. It may lag your computer; don't touch anything if it does.)
« Last Edit: May 26, 2014, 11:54:47 PM by Subpixel »

Easy. Just open the console, and type these two commands:

  • makeNewVehicle(Porche, 911);
  • crash(); (simulates the crash animations for the newly created vehicle. It may lag your computer; don't touch anything if it does.
stop

Easy. Just open the console, and type these two commands:

  • makeNewVehicle(Porche, 911);
  • crash(); (simulates the crash animations for the newly created vehicle. It may lag your computer; don't touch anything if it does.)
Dont forget to delete datablocks before doing this! its a crucial step

-sarcasm to stop from being banned by baddy again-

If you are really interested in putting the time and effort into creating a vehicle. First you need to learn how to model and to script. Some quick google searches can show you the basics of modeling. Its no easy task but the end result will be worth it (hopefully). Look at some pre-existing vehicles to try and grasp scripting. If that doesn't work you can always come here for resources on learning to script.

Happy now badspot?
« Last Edit: May 27, 2014, 08:41:04 PM by RarwMuffinz »

Badspot

  • Administrator
The appropriate response here is to make a joke, then direct him to some beginner info, not just make a joke and leave. 

Yeah, you can't change a vehicle's datablock - well, you can, but it often causes people to crash.

What you need to do is create a script to register a new datablock (derived from the jeep) with the shape file of a Porsche 911. I don't personally have a shape file for a Porsche 911, but you might.

If you need help look in this forum (specifically at the topics about creating datablocks) and the Vehicle_Jeep server.cs script. It'll just open with notepad, but a program like notepad++ or sublime text 2/3 would probably make things easier for you.

For making a Porsche 911 shape file from scratch, you might want to use a program like Milkshape or Blender. I'd recommend Milkshape as the simpler of the two, but Blender tends to be more reliable these days.
« Last Edit: May 27, 2014, 03:03:29 AM by chrisbot6 »

Easy. Just open the console, and type these two commands:

  • makeNewVehicle(Porche, 911);
  • crash(); (simulates the crash animations for the newly created vehicle. It may lag your computer; don't touch anything if it does.)
Why are you trying to fool a kid into crashing his own server.

Why are you trying to fool a kid into crashing his own server.
Could not find object 'Porche' attempting to call function 'makeNewVehicle'.

Could not find object 'Porche' attempting to call function 'makeNewVehicle'.

They aren't trying to call a method on an object.

Could not find object 'Porche' attempting to call function 'makeNewVehicle'.
um

The appropriate response here is to make a joke, then direct him to some beginner info, not just make a joke and leave. 

While you're at it could you change this to something more useful? Perhaps a link to one of the many tutorial megathreads? http://blockland.us/FAQ.html#v

You can find the default jeep model here, and you can find a tutorial on how to actually make the vehicle work here.

Oh, just make sure you don't screw up and actually make a porsche, because they won't like that.