Yes.. Scripts for addons again. |
Yes.. Scripts for addons again. |
Feb 16 2008, 10:42
Post
#1
|
|
New Member Group: Members Posts: 3 Joined: 16-February 08 Member No.: 2,387 |
Hey all!
Having recently played a lot of Arma with my cousin, we have decided to try and join forces in making an addon for the game. The unit would be a Hunter Killer MD250 (from the Terminator movies), but this is aside the point. Neither of us have ever touched the addon scene for either Operation Flashpoint or Arma, so we're still a bit in the dark. Now I understand making such a complicated unit (driver, 2 gunners, commander, lots of rotating, moving objects, etc.) is a big task, but that is beside the point. Now I've been looking around, searching for tutorials and have found a few very good ones on modeling (although it does not explain how to create tank-like vehicles, with turrets, tracks and the like), but have found very very few scripting tutorials. I've read the Vila's tutorial, but it's a bit unclear to me. So I'm asking if there are any (or anyone would be willing to make) step-by-step tutorials on how to build a unit script from the ground up with custom weapons, preferrably heavily commented for reference. I've studied a bit of Java/C++ in uni, but this has been a few years back and it still doesn't tell me how all the script lines work in Arma. Any help would be greatly appreciated! Cheers. |
|
|
Feb 16 2008, 14:35
Post
#2
|
|
huns not dead Group: Former .info Serviceman Posts: 329 Joined: 12-November 06 From: Pannonia Member No.: 72 |
Here, you can find a lot of tutorials.
OFPEC tutorials -------------------- HUNS
NOT DEAD |
|
|
Feb 16 2008, 15:52
Post
#3
|
|
New Member Group: Members Posts: 3 Joined: 16-February 08 Member No.: 2,387 |
Thank you, Bence, but unfortunately I have already checked through all of the scripting tutorials on that page and none of them explain what I'd like (even the JB tutorials don't really explain scripts in detail, since he mostly inherits most of the values from default vehicles). I'm not one to rush to forums yelling for help before I do my research, but frankly I have not come upon anything that would really help me start yet.
|
|
|
Feb 16 2008, 16:21
Post
#4
|
|
literally the BIG BOSS of OFP Group: Addon Maker Posts: 1,532 Joined: 12-November 06 From: Bari (ITALY) Member No.: 66 |
Here there is the command reference with all the commands, and their usage.
To create scripts, forst, think what you want to achieve, then start looking into the command reference guida (CRG) and see what you can do Also open some ArmA missions to study their scripts too -------------------- Visit my blog about Poker at Blogspot.com
-->TUTORIAL ON HOW TO MAKE NORMAL MAPPING IN ARMA!<-- -->MATERIAL EDITOR TUTORIAL!<-- -->DOWNLOAD MY HDT ISLAND!<-- judgement = hypocritical and slightly deluded |
|
|
Feb 18 2008, 13:48
Post
#5
|
|
New Member Group: Members Posts: 3 Joined: 16-February 08 Member No.: 2,387 |
Thanks for the help so far.
I've started messing about with an old HK model for Operation Flashpoint that was done by XPETIT. So here's the disclaimer: I am using XPETIT's addon for OFP and modifying his stuff without his permission, but am only doing so for learning purposes and will not actually publish his work under my name. With the formalities out of the way, I need some help. Again. This being an OFP addon, I have unpacked it with "WinPBO" and repacked with the Arma equivalent PboView. Of course, before repacking, I'm having a bit of fun with the code and model, trying to dissect the lines and their meaning and using the Arma wiki as reference. However, it's not been that easy, albeit I'm slowly getting there. So what have I done so far? - I know models need several levels of LOD, which I've seen while viewing the model. - I know models need mass and their components designated, such as tracks, lights, etc. - I think I understand memory points somewhat. They're used so the game knows where to "project" stuff from, like the driver's view, reflectors, etc. - I somewhat understand the skeleton aspect of the models. You can connect at most two bones, like a turret and the base, although apparently you can link additional bones to that, one by one. - I've played around with the config.cpp, but without much success (or at least without any really visible changes). I did manage to slightly alter the position the HK's lights point at in the model and make them much brighter in the code. For fun, I've tried making it a bit more movie-like, where the two reflectors would "scan" around, IE. moving slightly on the X-axis, but without success and I think I'm getting ahead of myself anyway. The first thing right now that I'd like to know is a few basics about tanks in Arma. What driving components do they need and how to properly define them? The model has 5 wheels designated on each of its tracks (kokolP1, kololl1, etc.). Now in the config file, there was no skeleton definition, so I've added one, yet the wheels refuse to turn. So in essence, what am I doing wrong? Never mind all the other errors I'm getting when testing the machine out in the game (yes, it actually works! Barely, anyway. You can only drive and turn the lights on.). Here's the code: CODE class cfgSkeletons { class Tank; class HKTankBones: Tank { isDiscrete=1; skeletonInherit = ""; skeletonBones[]= { "otochlaven","", "otocvez","otochlaven", "otochlaven_2","", "otocvez_2","otochlaven_2", "kolL1","", "kolL2","", "koloL1","", "koloL2","", "koloL3","", "koloP1","", "koloP2","", "koloP3","", "kolP1","", "kolP2","", }; }; class HKTank: Tank { sectionsInherit = ""; sections[] ={"kolL1","kolL2","kolP1","kolP2","koloL1","koloL2","koloL3","koloP1","koloP2","koloP3","svetlo PL", "svetlo PP", "Konec_svetla_PL", "Konec_svetla_PP", "otocvez","otochlaven","otocvez_2","otochlaven_2"}; skeletonName = "HKTankBones"; class Animations { class otocvez { type = "rotationY"; source = "mainTurret"; selection = "otocvez"; axis = "OsaVeze"; memory = true; sourceAddress = "loop"; minValue = rad -360; maxValue = rad +360; angle0 = rad -360; angle1 = "rad 360"; }; class otochlaven { type = "rotationX"; source = "mainGun"; selection = "OtocHlaven"; axis = "OsaHlavne"; memory = true; sourceAddress = "clamp"; minValue = "rad -8.5"; maxValue = "rad 50"; angle0 = "rad -8.5"; angle1 = "rad 50"; }; class otocvez_2 { type = "rotationY"; source = "Turret_2"; selection = "otocvez_2"; axis = "OsaVeze_2"; memory = true; sourceAddress = "loop"; minValue = rad -360; maxValue = rad +360; angle0 = rad -360; angle1 = "rad 360"; }; class otochlaven_2 { type = "rotationX"; source = "Gun_2"; selection = "OtocHlaven_2"; axis = "OsaHlavne_2"; memory = true; sourceAddress = "clamp"; minValue = "rad -8.5"; maxValue = "rad 50"; angle0 = "rad -8.5"; angle1 = "rad 50"; }; class kolol1 { type = "rotationX"; source = "wheelL"; selection = "kolol1"; axis = ""; memory = true; sourceAddress = "loop"; minValue = 0; maxValue = 1; angle0 = 0; angle1 = "rad -360"; }; class kolol2 :kolol1 { selection = "kolol2"; }; class kolol3 :kolol1 { selection = "kolol3"; }; class kolop1 { type = "rotationX"; source = "wheelr"; selection = "kolop1"; axis = ""; memory = true; sourceAddress = "loop"; minValue = 0; maxValue = 1; angle0 = 0; angle1 = "rad -360"; }; class koloP2 :kolop1 { selection = "kolol4"; }; class koloP3 :kolop1 { selection = "kolol5"; }; class kolp1 :kolop1 { selection = "kolp1"; }; class kolp2 :kolop1 { selection = "kolp2"; }; class koll1 :kolol1 { selection = "koll1"; }; class koll2 :kolol2 { selection = "koll2"; }; class Konec_svetla_PL //Please ignore this. This was my futile attempt to make one of the reflectors "scan" around. { type = "rotationX"; source = "wheelr"; selection = "Konec svetla PL"; axis = ""; memory = true; sourceAddress = "loop"; minValue = 0; maxValue = 1; angle0 = "-20"; angle1 = "+20"; }; }; }; }; And apologies for the humongous post. |
|
|
Apr 10 2008, 02:27
Post
#6
|
|
Member Group: Members Posts: 59 Joined: 1-November 07 From: South Carolina Member No.: 1,615 |
Hey Zim, I would say your best bet is to download some of the MLODs and check them out. Or maybe even better dl and open up the M60A1 tank to see how it was scripted. I have also been looking into the scripting of tanks for one of my own....projects
|
|
|
Nov 23 2008, 19:14
Post
#7
|
|
Member Group: Members Posts: 172 Joined: 24-July 07 From: UK Member No.: 1,007 |
{am using XPETIT's addon for OFP and modifying his stuff without his permission} i know you doing this just to work out how O2 works and that but it wud be nice just to get his permission to do the work on it but any way nice keep up the work
-------------------- 'The most beautiful thing we can experience is the mysterious.' - Albert Einstein |
|
|
Nov 23 2008, 20:43
Post
#8
|
|
ArmA.info Sarcasm Society's Appointed Olivia Wilde Stalker Group: Moderators Posts: 1,482 Joined: 12-November 06 From: United Kingdom Member No.: 113 |
This topic is several months old, you could of PM'd him instead of posting this...
Locked. -------------------- -------------------- Heed my words or risk being beaten with a stick then fed to my associate D@V£ The Rules - Most places have rules, these are ours Read them! Moderation Feedback Thread - Let everyone know how much you don't like D@V£ -------------------- |
|
|
Lo-Fi Version | Time is now: 26th April 2024 - 23:49 |