OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started 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
-
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:
"ordnance_name" camcreate getpos unit_name
or
"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
-
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)
-
;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:
-
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.
-
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
-
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
-
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. :)
-
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
-
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.
-
thats why we need someone to redo it
-
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. :))
-
;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 ;)
-
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
-
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:
-
;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
-
just add to the trigger pos:
"heat" camcreate [(getpos triggername select 0) + whatever extra,(getpos Triggername select 1) + whatever extra, 50]
-
;D Hi
could you give me an example of the whatever extra bit please,Sorry just a bit unsure.
THANKS ;D
-
"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.
-
;) ;D THANKS
To both of you,Thats done the trick,SORRY about the stupidity.
;DYou guys rule :toocool:
-
no problem dude, anytime. (someone will always be here to answer even the dumbest question)
-
LOL ;D
Boy and am i glad there are people to answer such questions
THANKS AGAIN ;)