Home   Help Search Login Register  

Author Topic: Pick up weapon = activate trigger?!?!  (Read 2298 times)

0 Members and 4 Guests are viewing this topic.

Offline Wadmann

  • OFPEC Patron
  • ****
  • I'm the next evolutionary step after a llama!
Re:Pick up weapon = activate trigger?!?!
« Reply #15 on: 18 Jun 2003, 17:47:12 »
Thanks for the recent replies!

@ Ace - I want it to be able to be used in MP so I did not want to limit it to Player. ;)

@deaddog - Thanks for the detailed response! When I get home this evening I will try it out and (hopefully) close this thread. One question though. Do I put the line rpd1_pos=getpos rpd1 in the activation line of the trigger that created rpd1?

Thanks for all of the help! ;D

                                   Wadmann
Check out my Camouflage Collection! New items added 31 July 2005.

deaddog

  • Guest
Re:Pick up weapon = activate trigger?!?!
« Reply #16 on: 18 Jun 2003, 21:10:23 »
Do I put the line rpd1_pos=getpos rpd1 in the activation line of the trigger that created rpd1?

Yes.  You can put all four of those lines in the activation line of one trigger, just separate them with a ;

KyleSarnik

  • Guest
Re:Pick up weapon = activate trigger?!?!
« Reply #17 on: 18 Jun 2003, 21:50:58 »
how do you create a weapon?

Offline Wadmann

  • OFPEC Patron
  • ****
  • I'm the next evolutionary step after a llama!
Re:Pick up weapon = activate trigger?!?!
« Reply #18 on: 19 Jun 2003, 04:53:42 »
I was hoping to close this thread but tis not the case! :(

@KyleSarnik - See the second reply in this thread and click on "this".

@deaddog - I copied and pasted right from your reply and nothing happened. ??? I even put some text in the trigger just to see if the trigger was activated but my scripts were not being triggered but still nothing happened! Did you actually create a demo mission to test your code and if so (and more to the point) do you still have it and can I get it?  Did you change any of the trigger settings like "Activation" or "Type"? I am not trying to make this any harder than it should be but a demo or even a script would sure help my sorry a*s out! Thanks in advance for any effort put forth to help me out of this nightmare. ;D

                                                Wadmann
Check out my Camouflage Collection! New items added 31 July 2005.

deaddog

  • Guest
Re:Pick up weapon = activate trigger?!?!
« Reply #19 on: 19 Jun 2003, 05:39:38 »
I didn't save my mission but I did make a new one.  Just a couple of triggers.  I attached it below.  Just make a folder called takegun.intro (or whatever) and put the mission.sqs file in it.

I did this with an ak47.  I did notice one interesting thing.  If you are carrying a gun (like the m16) and then take the one on the ground, the trigger will not activate.  If you drop the m16 and then take the ak, it works.  If you substitute a secondary type weapon (rpg or law), then the script will trigger.

My theory on this is this.  We are not actually creating a weapon.  We are creating a "weapon holder".  If we take the ak47 then the m16 is placed in the "weaponholder" and it doesn't "go anywhere" so its position does not change.

If we put a rpg in it, or we are empty handed, then no weapon is put back in the weapon holder.  It then is deleted or disappears, thus it moves.

Basically, if we trade weapons the trigger won't fire but if we take the weapon without replacing one, it works.

Also, you will have to wait about 20 seconds after the weapon holder is created before you can take the weapon.  An OFP issue.

Let me know if this helps.  :)
« Last Edit: 19 Jun 2003, 05:40:02 by deaddog »

Offline Wadmann

  • OFPEC Patron
  • ****
  • I'm the next evolutionary step after a llama!
Re:Pick up weapon = activate trigger?!?!
« Reply #20 on: 19 Jun 2003, 17:48:10 »
Thanks for taking the time to make a demo deaddog. After posting my reply last night, I attempted to resolve this on my own (mistake) and several hours later determined that your code should have worked! I guess great minds think alike as I came to the conclusion that "rpd1" never moved, nor was it picked up,merely replaced so that the trigger conditions that we were trying would not work. I finally used a small any unit present trigger to get it to work.

One thing I must now work out ( if possible) is when using a secondary weapon like a rpg as a created weapon, it stands up vertically, not lying down like an ak would. I did download a script from the editors depot the tweaks the pitch/bank of an object and will atempt to get an rpg to lay on the ammo box when time permits.

I would like to resolve this so that I can start another thread with an issue that I now have with imported sounds not working. :P If it's not one OFP issue, it's another!

Hopefully my next post will be "Case closed!". ;D

                                                Wadmann
Check out my Camouflage Collection! New items added 31 July 2005.