OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: dan ick on 29 Jan 2005, 14:57:04

Title: Camcreate
Post by: dan ick on 29 Jan 2005, 14:57:04
 ;D O.k

            I got this code from an answered question and just wanted to know whether it is possible to use in a trigger,i have tried it but keep getting an error message,So heres the code:-

name="ordnance" camcreate getpos object

The explanation was not that clear so i have sort of had to guess some of the things.ie where name is i put the unitname and the object i placed an invisible H and named it,Then in the code i replaced object with the name of the invisible H.If someone could point out where iam going wrong it would be much appreciated.
Iam sorry if i am way out on this but i'll be honest i am a bit of a NOOBULATOR.sorry.


Any advice or info would be great. :)

                                     THANKS ;D
Title: Re:Camcreate
Post by: bedges on 29 Jan 2005, 15:32:01
hello noobulator... :P

i must confess i only recently discovered the joys of camcreate myself, but it seems that the code you're trying to use can't be called from inside the trigger, rather you have to put the commands in a script and call them using the trigger.

as far as the syntax goes, i believe it is thus:

Code: [Select]
"ordnance_name" camcreate getpos unit_name
or

Code: [Select]
"ordnance_name" camcreate getmarker pos "marker_name"
where "ordnance_name" is one of the shell names found in the comref, such as "shell125" or "heat73". like i say, i haven't experimented with this much myself, so play around, see what works.

hope this helps
b

Title: Re:Camcreate
Post by: Triggerhappy on 29 Jan 2005, 15:33:49
place what you want to know in the editor and save it, then look in the mission.sqs to get the type, or you place it and put this in its init:
hint format ["%1",(typeof this)]

and you'll get a hint telling you what to use

basically you have to use the config name, not the editor name
for the bis stuff, check the comref in config vehicles or something like that(i forget the actual name)
Title: Re:Camcreate
Post by: dan ick on 29 Jan 2005, 15:58:45
 ;D O.k

              Thanks for the info Bedges and TriggerHappy,It seems its going to be alot trickier than i thought as i have never really written scripts.I read the Tutorial (3 TIMES) and understood most of it but the name thing tripped me out a little (ie.this select_o,or something similar).Although Silencer did help me out and i thought i knew how to activate them but its just certain ones.but i guess i will just have to keep reading  ;).Anyway thats going away from the reply.
Thanks for the info (both of you) and i will get learning. :noo:

                                  THANKS

                     ;DNOOBULATOR OUT :gunman:
Title: Re:Camcreate
Post by: macguba on 29 Jan 2005, 16:09:03
AFAIK there is no problem with using a camCreate command in a trigger as long as you get the syntax right.    In general the game doesn't care whether a line of code is in a trigger, script, waypoint, init field or whatever.
Title: Re:Camcreate
Post by: dan ick on 29 Jan 2005, 16:13:25
Macguba  ;D

                      Sorry for this but how would i find the right Syntax.It really needs to be explained as simple as possible as i myself am simple ;D

If you could just point me in the right direction,or if anyone can help,Please do ;)

                                    THANKS ;D
Title: Re:Camcreate
Post by: Triggerhappy on 29 Jan 2005, 19:08:49
the syntax for camcreate is:
type camCreate position

type being the config name of what you're making (a string)

so for example:
GameLogic = "logic" camcreate getpos player
Title: Re:Camcreate
Post by: macguba on 29 Jan 2005, 19:23:40
When you encounter a new command, I strongly recommend that you consult both the online version (http://www.ofpec.com/editors/comref.php) of the comref and also the Unofficial comref. (http://www.ofpec.com/editors/resource_view.php?id=28)    There you will learn the syntax, and often find helpful tips and examples.     Following this procedure will save much time and frustration.    There are other version of the comref, and some people like to use those too.

If you're still not clear on how to use a command, check the searchable FAQ in the Editors Depot and use the forum search function.  

There is a tutorial in the Ed Depot which explains the mysteries of "this" and "_this".

And if all else fails, post a question.   :)

Title: Re:Camcreate
Post by: Triggerhappy on 29 Jan 2005, 20:00:27
actually, maccy, i have the downloadable text version of the official comref and the unofficial. and the unofficial one is missing just about everything but the basic commands. also it doesn't have the cfgvehicles, or syntaxes for scripts, functions,EHs etc. so i would suggest dling the text version of thwe official comref
Title: Re:Camcreate
Post by: macguba on 29 Jan 2005, 20:33:52
The unofficial is indeed missing lots of stuff, not least because it applies to an early version of OFP.     But it does tend to have helpful examples, and a lot of other good stuff besides.   Its real benefit is that it gives a different take on the same thing.   You look up a command in the official, don't really understand it, head over to the unofficial and sometimes you get an "oh I see!" out of it.
Title: Re:Camcreate
Post by: Triggerhappy on 30 Jan 2005, 04:13:58
thats why we need someone to redo it
Title: Re:Camcreate
Post by: Dubieman on 30 Jan 2005, 04:20:55
Well dan ick,

look in the editor depot for weapons listings, they help when creating explosions.

If you're still having problems you could look at other's scripts, that usually helps me if I can see it used with the correct syntax. Any and all explosion scripts in the ed depot use camcreate. Alright maybe older ones do not. ::) (before the command was introduced, ppl would setpos exploding objects and make them vanish quickly to simulate an explosion. :))

Title: Re:Camcreate
Post by: dan ick on 30 Jan 2005, 12:49:52
 ;D O.k
             Thanks for all the info guys i will have to get searching :wow: and learning  :P


                               Thanks to all of you



                                         ;D THANKS ;)
Title: Re:Camcreate
Post by: StonedSoldier on 02 Feb 2005, 11:14:53
i dunno if someone has already answered the original question; to use camcreate in a trigger write it as;

{shell120} camcreate getpos player

i remember playing around with that a while ago and i think i got it top work
Title: Re:Camcreate
Post by: dan ick on 02 Feb 2005, 18:56:55
O.K ;D

            Thanks ;) stonedsoldier i will look into this.I had been searching the command ref and could not really find what i needed (Posssibly more to do with that iam not that clued up on what i needed).Anyway thanks for the info,i will have a good play round with this,as with most things to do with Flashpoint it is Trial and Error :P

Once again THANKS for the help.



                                       ;) ;D ;D
                                       :cheers:
                             NOOBULATOR OUT :gunman:
Title: Re:Camcreate
Post by: dan ick on 02 Feb 2005, 21:08:08
 ;D O.k

            The original code i got,as i said was a little out,so with a bit of faffing about i got it to work in a trigger like this

ordnance="heat73" camcreate [(getpos triggername select 0),(getpos triggername select 1),50]

Obviously triggername is the name of the trigger,But i was just wondering whether i could add more than one heat hitting the ground,that is activated from the same trigger,also can i change the position of the blast (NOT THE HEIGHT) so it doesnt hit dead centre of the trigger.

Any info would be great


                                        THANKS ;D
Title: Re:Camcreate
Post by: Triggerhappy on 02 Feb 2005, 22:14:18
just add to the trigger pos:
"heat" camcreate [(getpos triggername select 0) + whatever extra,(getpos Triggername select 1) + whatever extra, 50]
Title: Re:Camcreate
Post by: dan ick on 02 Feb 2005, 22:48:19
 ;D Hi
          could you give me an example of the whatever extra bit please,Sorry just a bit unsure.


                                       THANKS ;D
Title: Re:Camcreate
Post by: macguba on 03 Feb 2005, 00:57:52
"whatever extra" is just the number of metres you want the shell to be offset from the centre of  the trigger in that direction.   So it might be 10 or 30 or something like that.
Title: Re:Camcreate
Post by: dan ick on 03 Feb 2005, 01:22:59
 ;) ;D THANKS

                        To both of you,Thats done the trick,SORRY about the stupidity.


                             ;DYou guys rule :toocool:
Title: Re:Camcreate
Post by: Triggerhappy on 03 Feb 2005, 04:18:05
no problem dude, anytime. (someone will always be here to answer even the dumbest question)
Title: Re:Camcreate
Post by: dan ick on 03 Feb 2005, 18:50:50
LOL ;D
 Boy and am i glad there are people to answer such questions


                                 THANKS AGAIN ;)