OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: sussmori on 13 Oct 2002, 12:55:31

Title: Reloading via action command?
Post by: sussmori on 13 Oct 2002, 12:55:31
Hi,

How do I reload a magazine using the action command? I can't figure out the syntax...

I tried with a grenadier:
player action ["Reload", "m203muzzle", "Grenadelauncher"]


but it doesn't work. Does anyone know the correct syntax for reloading via the action command?

thx
Title: Re:Reloading via action command?
Post by: lilmat on 13 Oct 2002, 16:48:46
Ok try this? ;D
unitname action["magazine","weaponname"]
this will make the unit reload
BTW get the animations tutorial, this will help you. ;D
Title: Re:Reloading via action command?
Post by: sussmori on 14 Oct 2002, 02:17:58
I tried with a west/east soldier:

player action ["magazine", "m16"]
and
player action ["magazine", "ak74"]

but it did not work, no reloading occured
Title: Re:Reloading via action command?
Post by: Ranger on 14 Oct 2002, 05:29:16
I haven't tried it myself, but I think lilmat meant for you to try something more like:

player action ["m16", "m16"]

HIs "magazine" was where you were supposed to substitute in the name of the magazine.  I'll use the Beretta as a clearer example, since its magazine name is different than the weapon name.

player action ["berettamag", "beretta"]
Title: Re:Reloading via action command?
Post by: sussmori on 14 Oct 2002, 05:52:38
No this is not what he meant. "magazine" is an action command parameter like "reload" or "eject" or "sitdown".

player action ["m16", "m16"]       does not work

thx anyway

Title: Re:Reloading via action command?
Post by: lilmat on 14 Oct 2002, 10:24:21
Yep that's true, sorry you got confused about the "magazine"
part. Ok well these actions can be difficult at times. So all I
can say is try to get the Animations tutorial, over at
opflashpoint.org ;D
Title: Re:Reloading via action command?
Post by: sussmori on 16 Oct 2002, 11:38:58
I read Hangfyre's tutorial at opflashpoint.org and unfortunately this did not solve my problem.

It seems that no action commands that include a weapon work, even though the tutorial says they do.

For example i tried:
w1 action ["WEAPON","lawlauncher"]  for a LAW guy
w1 action ["MAGAZINE","m16"]
w1 action ["WEAPONONBACK","m16"]

And none of these work. However the ones that do not have parameters like:

w1 action["SITDOWN"]
w1 action["EJECT"]

work fine. It makes we wonder whether Hangfyre or the guys that came up with the original action command list in the Unofficial OFP Command Reference manual ever tested all of them? I don't think so or maybe newer versions made these actions obselete.

Any ideas?
Title: Re:Reloading via action command?
Post by: Waterman on 16 Oct 2002, 13:02:37

For example i tried:
w1 action ["WEAPON","lawlauncher"]  for a LAW guy
w1 action ["MAGAZINE","m16"]
w1 action ["WEAPONONBACK","m16"]

And none of these work. However the ones that do not have parameters like:

w1 action["SITDOWN"]
w1 action["EJECT"]


Should that not be:
w1 action["WEAPON","lawlauncher"]  for a LAW guy
w1 action["MAGAZINE","m16"]
w1 action["WEAPONONBACK","m16"]
(note: there is no space between- action and the[.)

Not sure,
Hope this helps,
Waterman. 8)
Title: Re:Reloading via action command?
Post by: sussmori on 16 Oct 2002, 14:48:23
This makes no difference, I was so desperate I actually tried it :)

thx anyway
Title: Re:Reloading via action command?
Post by: lilmat on 16 Oct 2002, 17:31:03
Well we all do try to test all things! 8)
Now these actions have givin a lot of people greif!!
Look at the doc again, you will find the correct way IS!!!
action["magazine",m16] you do not have "" bewteen the
second command. I do know most of these work. I have
tried most myself.
Sorry I can't help more. ???
Title: Re:Reloading via action command?
Post by: sussmori on 17 Oct 2002, 03:31:30
Nope, as I thought, this does not work either.

I am curious when you say that you have tried most yourself. Have you ever actually tried one that includes a weapon parameter such as reload or weapononback? I doubt it.

As I said before, I believe that none of the actions that include a weapon parameter work. I don't think they ever did! I think they were written originally in the Unofficial OFP Command Reference manual without being tested and since then everyone assumed they worked but no one has actually ever used them successfully.

I'd love to be proved wrong!  :-\
Title: Re:Reloading via action command?
Post by: lilmat on 18 Oct 2002, 17:59:53
Hello Again! ??? :-\
Well I thought I'll give these commands a go for you. BUT!!!!
Now I find more of these NOT working :-[???
Sorry for this, there are some that still work!
Tomb had the same prob with the fire command, trying to get
units to fire manually!! And some if not alot of these
do not work. Wonder if it has to do with the updates.
I tried for you but, the ones you want, don't work.
See if you can get around this. ??? 8)
Title: Re:Reloading via action command?
Post by: sussmori on 21 Oct 2002, 03:16:00
That's right:

any action command using a weapon parameter does not work

This should be noted in a sticky or hints/tips so that other people do not waste their time trying to get them to work.