OFPEC Forum

Addons & Mods Depot => OFP - Addons & Mods General => Topic started by: Danakin1 on 28 May 2008, 04:53:57

Title: ArmA scripting Vs. OFP scripting
Post by: Danakin1 on 28 May 2008, 04:53:57
Does anybody know if most scripting for ArmA will work with OFP?  I seem to be able to only fine Tutorials for ArmA scripting. ???
Title: Re: ArmA scripting Vs. OFP scripting
Post by: Cheetah on 28 May 2008, 07:58:09
Most scripting in terms of addons and mods or just general scripting?

In case of the first, you'll get a good reply from the addon boys. In case of the second, you might start here (http://www.ofpec.com/ed_depot/beginners/). Not all will work, the demo mission won't work but it's a good start.

Oh, and in case 2 this thread is in the wrong section.
Title: Re: ArmA scripting Vs. OFP scripting
Post by: Gcfungus on 28 May 2008, 10:02:15
I think that your problem is that in any of the depots, the ArmA filter is on. Simply change it to both, and you should find all of them.
Title: Re: ArmA scripting Vs. OFP scripting
Post by: Danakin1 on 28 May 2008, 19:44:31
Cool, thanks for the info...  I'll check it out.
I found an article regarding Lustypooh's and Niosop's editing reference, but I have yet to be able to find them.
I saw a page that says Lustypooh's is shut down? :blink:
Title: Re: ArmA scripting Vs. OFP scripting
Post by: Cheetah on 28 May 2008, 22:12:30
This very website you are watching was once formed over the remnants of Lustypooh's website. The editing reference you are probably looking for is what is called the Command Reference or simply COMREF (http://www.ofpec.com/COMREF/).
Title: Re: ArmA scripting Vs. OFP scripting
Post by: Danakin1 on 29 May 2008, 02:42:48
Sweet!  :clap:
 Thanks a billion.  I made a cheeze cutscene and as basic as it is.  I'm pretty proud of myself.  I cheated by using me as play and another unit.  Then added a trigger plus waypoint. 

This is very limited and I really don't have much control over the AI pilot and Airwolf.  All I can do is watch Airwolf fly around and listen to the AI pilot yelling... fire! fire!, but nothing happens.  :dunno:

The only way I've been able to get Camera angles is to use camera.sqs, then capture the cordinates then past them in the script. 
Is there a faster way of doing this?  Or do I need to learn the "Grid" better. ???
Title: Re: ArmA scripting Vs. OFP scripting
Post by: Gcfungus on 29 May 2008, 08:51:54
That's not too difficult. To make a camera move use something like this:
Code: [Select]
_camera settarget aP
// User setrelpos first value is left-right, second is forward-backward, third is up-down
_camera setrelpos [10,15,0]
_camera camcommit 6
@camcommitted _camera
Title: Re: ArmA scripting Vs. OFP scripting
Post by: Danakin1 on 29 May 2008, 18:06:38
Cool, I'll try that script out.  Thanks for all your help.   :good:

It's cool to have this forum and you guys to help with all your tips.   I'm amazed at how far I've gotten so far.  I started with no knowledge and now I've gotten a few scripts written down. 
I tried a simple script the other night...  I made the other unit do some pushups...  Cheeze, but the idea was to learn how to do a objpass script.

I tried another script that was supposed to make a Jeep blow up when a unit entered it, but I must have typed the script wrong.

What does "ap" mean in a script? ???
Title: Re: ArmA scripting Vs. OFP scripting
Post by: Cheetah on 29 May 2008, 19:06:27
camSetTarget (http://www.ofpec.com/COMREF/index.php?action=list&game=All&letter=c#54) should be used in the script as far as I know.

aP is, as you can see in the URL, is the object or unit targetted. Here aP is a variable indicating a specific unit, it may as well have been 'player','rambo' or 'cheetah'.
Title: Re: ArmA scripting Vs. OFP scripting
Post by: Danakin1 on 29 May 2008, 23:22:33
Ok, so that's why the script I wrote for the Jeep did not work.  I should have placed [jeep, this] in the sqs instead of [ap, this]... :good:
I was going off a worksheet.  I gotta learn not to pay attention to what I'm scripting.
Title: Re: ArmA scripting Vs. OFP scripting
Post by: Gcfungus on 29 May 2008, 23:24:41
I thought aP stood for 'a player'. Either way, it's just the subject so that scripts are more generalised.
Title: Re: ArmA scripting Vs. OFP scripting
Post by: h- on 30 May 2008, 21:47:57
aP was used as the player's object name in missions by BIS and it stuck, virtually everybody uses/used it to name the player(s)..
Although I always used me :P
Title: Re: ArmA scripting Vs. OFP scripting
Post by: schuler on 31 May 2008, 19:19:51
Quote
It's cool to have this forum and you guys to help with all your tips.
on be heft off all staff i say thank you  Danakin1 :yes:
@ : h-  lol same thing with me but its just ap1 ,,,,, not aP or me! or you!  :P just for fun mate you know me i have to complicate things!!!!!
remember what tags are for ya'll MP and coop!!!!!!
cheers schuler
Title: Re: ArmA scripting Vs. OFP scripting
Post by: Danakin1 on 01 Jun 2008, 23:52:24
No worries...  I love this site.  It's full of cool stuff and everyone has been pretty helpful. :good: