Author Topic: Spawning .dif in mission editor  (Read 1872 times)

I only just bought blockland today, so I'm not too sure what I'm doing wrong.. But when I attempt to spawn .dif files using the mission editor - Well, nothing happens. It just doesn't want to spawn the item. I can spawn the tutorial .dif and everything o.k, but not my own.

Steps that I'm using to spawn items:
  • Export dif in constructor
  • Save them to data directory
  • Select World > Drop at camera
  • Select world editor creator (Out of the window menu)
  • Select interiors > Base > Data > myfile.dif (Out of the spawn menu)

Then, absolutely nothing happens. I've checked in the Mission group to make sure of this. Any help would be greatly appreciated.

Edit: Solved!
In constructor you need to export with the map2dif plus export option. TGEA works too.
« Last Edit: May 06, 2009, 01:57:00 AM by Honth »

You have to look at a certain angle sometimes :/

No, that isn't the problem. I can spawn the default.dif's without moving the angle what-so-ever.

Still looking for an answer :s

In constructor you need to export with the map2dif plus export option. TGEA works too.

In constructor you need to export with the map2dif plus export option. TGEA works too.
Worked a charm, thanks!

Sorry for the double post - New question.

I'm building windmills for my map out of bricks, and I want to attach animated models of the windmill blades to the windmills - How would I go about doing this?

I made the model in 3dsmax, and I've spawned it static ingame (Which looks brilliant :D) but I'm not sure how I would load it with the animations and such. It already has a mountPoint in the correct position, and an animation. Do I need to make it an item? If so - How do I make an item animate when spawned on a brick?

Many thanks.
« Last Edit: May 06, 2009, 05:01:38 PM by Honth »

Here, use this.

datablock StaticShapeData(Name)
{
   category = "YourCategory";
   shapeFile = "./Filename.dts";
};

function Name:: onAdd(%this,%obj)
{
   %obj.playThread(0,"animation");
}

Replace what you need to. Make Yourcatagory whatever you want to make it. It will loop the animation of what you add. Replace filename.dts with yourmodel'sname.dts and replace "animation" with your animation's name. Put this script at the top of the map's .mis file.

That's all working fine, but the animation isn't looping.. any reason why? I exported it to milkshape then to dts, is there something I should have ticked in the dts plus exporter?

The animation plays once, then stops.

Edit: Solved!

When exporting the .dts with the animation sequence, you need to click the tick box next to "Cyclic" for it to repeat.
« Last Edit: May 07, 2009, 03:35:39 AM by Honth »