Home   Help Search Login Register  

Author Topic: setpos getpos woes  (Read 1035 times)

0 Members and 1 Guest are viewing this topic.

Offline Alan34

  • Members
  • *
  • Praise the Lord and pass the Carl Gustav
    • Red Devils
setpos getpos woes
« on: 06 Nov 2002, 05:01:05 »
I'm moving a soldier called Moron to a game logic called Spot using our old friend:

Moron setpos [getpos spot select 0, getpos spot select 1,79]

I think most people use this method at the start of their mission; well I need mine about 30 minutes into the mission.  I've down a lot of testing and this techinque works fine for roughly 30 seconds after the start of a mission.  Beyond that, the trigger will fire (even the sound effect you picked)  BUT the line above is ignored!  Very weird.  Any work arounds for this OFP oddity?

Azraell

  • Guest
Re:setpos getpos woes
« Reply #1 on: 06 Nov 2002, 23:07:42 »
 have the trig fire at the start of mission , but have it timed out for 30 minutes...... or have a variable become true at the point of the mission where u need moron to setpos

Offline Alan34

  • Members
  • *
  • Praise the Lord and pass the Carl Gustav
    • Red Devils
Re:setpos getpos woes
« Reply #2 on: 07 Nov 2002, 03:08:16 »
I had tried the variable=true approach earlier to no avail.  Tested the time delay method and it also does not work.  If you delay the trigger for any reason beyond mission start+30 secs or so.....the On Activation field is ignored.  This must be a bug in OFP regarding the use of setpos/getpos.  

Mike

  • Guest
Re:setpos getpos woes
« Reply #3 on: 07 Nov 2002, 04:02:29 »
make a script...

~300

will pause 5 mins

~1800 is 30...  so

do:

Code: [Select]
~1800
Moron setpos [getpos spot select 0, getpos spot select 1,79]
« Last Edit: 07 Nov 2002, 04:03:08 by Mike »

Offline Alan34

  • Members
  • *
  • Praise the Lord and pass the Carl Gustav
    • Red Devils
Re:setpos getpos woes
« Reply #4 on: 07 Nov 2002, 05:30:12 »
I had tried a script earlier.  No luck.  If you delay the trigger by ANY method for more then approx. 30 secs,  trigger will not work.  This has only happened to me with setpos/getpos.  Otherwise, triggers don't experience this strange behaviour. My only thought now is if triggers can be dynamically created in the middle of a mission.  Then I could create the trigger and fire it within OFP's 30 sec window of time.  

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re:setpos getpos woes
« Reply #5 on: 07 Nov 2002, 10:17:02 »
to me, that makes so sense what-so-ever. I mean, in that case ANY triggers with setpos/getpos which would not be fired within 30 seconds would all be ignored, right? e.g: you cannot move anything on the map after 30 seconds! That would be slightly more than a small bug, my friend.

Try it with another trigger, maybe the current one is for some reason messed-up. Maybe it would be a better idea to leave the count-downing to a second trigger, and have the setpos one activated by just a variable (unless you tried that already). Haven't got OFP with me, and I won't for quite some time so I can't test this little "oddity" empirically...argh. How about putting ()'s around the 'getpos spot select 0' lines ;) Shouldn't make any difference, but for some reason it often does...

And that script...if THAT doesn't work, you should consider finding a better cracking program 'cause Fade is obviously messing up your head...I can somehow still manage with a trigger going haywire, but a simple script like that CAN NOT not work!  :o  :o  ???

Bahh. Alas, if only I had OFP with me...last resort: post mission with the faltering trigger ;) Damnit if we can't get this solved...:P

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

Offline Alan34

  • Members
  • *
  • Praise the Lord and pass the Carl Gustav
    • Red Devils
Re:setpos getpos woes
« Reply #6 on: 07 Nov 2002, 14:53:01 »
Rest assured FADE is not the issue.  I only use retail versions of OFP.  I will try your ideas when I get home from work.  If it does not help, I will post a sample mission.   Thanks

Offline Alan34

  • Members
  • *
  • Praise the Lord and pass the Carl Gustav
    • Red Devils
Re:setpos getpos woes
« Reply #7 on: 08 Nov 2002, 04:09:33 »
Wolfrug's suggestions made no difference...however...I know why this is not working.  Moron is a parachute unit.  He starts the mission in his chute (flying) and lands on the ground. Around 30 minutes later, when troops walk into and activate my trigger...Moron is not going anywhere:(  Once he's on the ground, setpos/getpos does nothing. Thats why the trigger works in the first 30 secs of mission...because Moron is in the air when he is moved by setpos/getpos.  In summary, is it possible to have soldier parachute later in mission (and NOT by having him eject from a chopper,etc)?  I think Camcreate would work but units from this method have bad AI.

Offline mcnorth

  • Members
  • *
Re:setpos getpos woes
« Reply #8 on: 08 Nov 2002, 12:48:11 »
So are you trying to get moron to drop out of the sky when guys walk into your trigger area? If so, can't you add a line to your script that will move him into the parachute then offset the z coordinate by, let's say, +100 or so?

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re:setpos getpos woes
« Reply #9 on: 09 Nov 2002, 10:11:48 »
AaaaHHaaah ;-D NOW we got it! Hehe, shoulda told us that from the start ;) I suppose moron is one of them pre-set parachuters, a blackop in a chute, which you can then set to flying? Well, in that case the name you gave the parachuter is actually the name of the VEHICLE he's in, e.g the chute! So no wonder setpossing does nothing :D

Riight, anyhow, camCreate is indeed what you need. Here's what you do:
create moron (just normal blackop or whatever, ground-based).
make trigger, condition whatever. Use the old trustworthy friend, plus the line after: moron setpos[(getpos spot select 0), (getpos spot select 1), 79]; para="Parachute" camCreate getpos moron; moron moveInDriver para

there, he will peacefully come gliding down over the gl named spot when you activate your trigger. What the lines after the setpos do, well, you create a parachute, and then teleport moron into it. Same method as used in HALO scripts.

Should work...no OFP tho, so... :P ::) Ah well.

Wolfrug out.

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

Offline Alan34

  • Members
  • *
  • Praise the Lord and pass the Carl Gustav
    • Red Devils
Re:setpos getpos woes
« Reply #10 on: 09 Nov 2002, 16:18:33 »
Works good Wolfrug, thanks for the explanation and info. I did separate the line over 2 triggers with one trigger having a 1 second delay.  Otherwise, sometimes the Blackop looked like he was on top of the canopy when starts.  Thanks again ;)