Huse scripting in Juice

From WiCWiki

Jump to: navigation, search

Contents

Follow the first steps from how to script a prop to create a name and a slot for the house.

The expanded view should look something like the image below. The rest is pretty straight forward.

Image:House_01.jpg

Image 1.16


Scripting the model files

Right click on the myVisualModel label and browse to the mrb file (modelname.mrb) model file.


Image:House_02.jpg

Image 1.17


Scripting the shadow file

Do the same on myShadowModel label to locate the sdw file (modelname.sdw) for the props shadow.


Image:House_03.jpg

Image 1.18


Scripting the physics file

Follow the steps above on the myPhysModel label to locate the ice file (modelname_rb.ice) for the physics.


Image:House_04.jpg

Image 1.19


Scripting the slot file

Do the same on the mySlotFile label to locate the slot file (modelname.slot) for the slots. Don’t forget to set the value on myMaxNumSquads, depending on how many slots there is. For the slots to work the value have to be at least 1.

Image:House_05.jpg

Image 1.20

Image:House_06.jpg

Image 1.21


Setting the material for hit effects

Determine the material for the house, the house material is preferred.


Image:House_07.jpg

Image 1.22


Setting the health

Right click on the labels myArmor and myHealth to set the health, also select a template that matches the house size and material on the myTemplate label.

Image:House_08.jpg

Image 1.23

Image:House_09.jpg

Image 1.24


Image:House_10.jpg

Image 1.25


Scripting the wire file

Right click on the myWireFile label and locate the ice file (modelname_wires.ice) which contains data about the wire connections for the house.


Image:House_11.jpg

Image 1.26


Scripting the death effects (optional)

The following steps are optional; they are used when you create a death animation for the house and for adding the rumble (get-y) mesh under the wreck.


Setting the house to be destroyable

First off the myIsDestroyableFlag have to be set to 1.


Image:House_12.jpg

Image 1.27


Adding a death effect

Expand myDeathEffects and right click on the myDeathEffects label and the edit ScriptClass menu opens up (image 1.28). Click the Add button and the Add ScriptClass Content menu appear (image 1.29) just click the OK button


Image:death_01.jpg

Image 1.28

Image:death_02.jpg

Image 1.29


You have now added a death effect, (it should look like image 1.30). Click the OK button to get back to the juicemaker. Expand the newly created DeathEffect(0) [DeathEffect], (image 1.31).


Image:death_03.jpg

Image 1.30

Image:death_04.jpg

Image 1.31


Scripting the death animation

This step is just like adding any other file in the Juicemaker, right click on the myFileName and locate the mrb file containing the death animation. Image 1.32


Image:death_05.jpg

Image 1.32


Setting the time for the death animation

To set the time the death animation as active right click the myLifeTime label and enter a value in seconds. Image 1.33


Image:death_06.jpg

Image 1.33


Scripting the get-y mesh

In order to be able to have a ground deformation under the house, aka gety file. There must be an mrb file scripted under the myFileName (step 8.3). It can be an empty file (no animation or mesh) but it has to be there in order for the gety to work. And there has to be a slot file (step 4 under scripting a house) other wise the game engine won’t know if it’s a house or a prop.


Right click the GetYFile label and locate the modelname.gety file.

Image:death_07.jpg

Image 1.34

Image:death_08.jpg

Image 1.34


Scripting the AI to be able to drive through wrecks

First off there has to be a physics file (deathmodelnamn_rb.ice) scripted (image 1.35). The AI box in the file has to have the box is cutting option checked.

Locate the myDeathEffecsPathFindingFlag and set it to 1 to enable the feature.

Image:death_09.jpg

Image 1.35

Image:death_10.jpg

Image 1.36

Personal tools
User Created Content