Forum

> > Stranded II > General > can I add unit types?
Forums overviewStranded II overviewGeneral overviewLog in to reply

English can I add unit types?

7 replies
To the start Previous 1 Next To the start

old can I add unit types?

Elimnator
User Off Offline

Quote
Can I add unit types? Like the monkey, raptor, ect.
And in Stranded 2 Ext. Mod they added mosquito.

Also I made a model in blender, animated it and exported it as b3d. Then when I made a unit using the model the game crashed saying: Entity has no animation!

old Re: can I add unit types?

Hurri04
Super User Off Offline

Quote
no, you cant make a new behaviour without midifying the source code which is completely different from scripting because you'd have to get used to the already existing code, learn a new programming language (Blitz3d) and its commands and finally be able to write your own type of behaviour for units. as far as I know only 3 people work on the source code at the moment and for it it very hard for someone who is not used to programm within the source code to find his way into it.

to the animation problem:
well, maybe the real problem is that you didnt write a proper definition for the unit and its animations into the definition file...?
also the animations have to be loaded via a script in the game.inf file which is triggered on:preload.
I suggest you have a look at the scripts in the Extension Mod.



btw: using the newbie questions thread is not shameful

old re

Elimnator
User Off Offline

Quote
This is how I have the script:
---------------------------
### Jeep
id=86
name=Jeep
group=vehicle
icon=gfx\jeep.bmp
model=gfx\jeep.b3d
health=500
speed=3
mat=stone
scale=20.0
ani_move=1,10,1
ani_idle1=11,20,1
maxweight=30000
rideoffset=60
script=start
     on:use {
          clear;
          add "You can drive this jeep or store stuff inside.";
          add "What do you want to do?";
          msgbox "Jeep";
          local $id;
          $id=current_id();
          add "exchange 2,$id;";
          button 0,"Store stuff",19;
          add "ride $id; closemenu;";
          button 1,"Drive the jeep",8;
          add "closemenu;";
          button 2,"Do nothing with the jeep",3;
          freevar $id;
     }
     on:kill { free "self";
     }
script=end
------------------------------
And here is the model zip:
http://www.gamefront.com/files/20015912/jeep.zip

old Re: can I add unit types?

Hurri04
Super User Off Offline

Quote
well, you have to write this into a definition file. I think the units_vehicles.inf file fits best.

then you have to write this into the game.inf file:
1
2
3
4
on:preload {
	loadani 86, 1, 10;
	loadani 86, 11, 20;
}

old re

Elimnator
User Off Offline

Quote
I added it and nothing changed.

old re

Elimnator
User Off Offline

Quote
Never mind, I fixed it.

old Re: can I add unit types?

BiGSiD
User Off Offline

Quote
please tell us, how you fixed this problem, for the next ones, who ask the same or a similar question!
To the start Previous 1 Next To the start
Log in to replyGeneral overviewStranded II overviewForums overview