Home   Help Search Login Register  

Author Topic: You... could be Mine  (Read 3240 times)

0 Members and 1 Guest are viewing this topic.

Offline Sui

  • Former Staff
  • ****
    • OFPEC
You... could be Mine
« on: 02 Oct 2002, 15:38:59 »


[attachment deleted by admin]
« Last Edit: 02 Oct 2002, 17:00:34 by Sui »

Offline DrStrangelove

  • Members
  • *
  • Mr.Creative
Re:You... could be Mine
« Reply #1 on: 13 Oct 2002, 19:22:54 »
Hi. I didn't DL your script yet, i just have a little comment.

Is it really important that deactivating the mine is 'really' happening ? If you can't figure out how to be 100% sure that engineers will deactivate marked mines every time , why not simulating it ? As long as it seems realistic to the players, everything is alright to do the job.

When the engineer is walking to the mine's position, I'd just check the distance to the marked mine and when he's closer than 1.5m (or so) just play the deactivate-animation and camdestroy the mine object. You could even spawn a new object there that represents a deactivated mine (if there's such a thing).

Just my 2 cents actually. I really love your idea. We need more of these little things to make the AI look smarter.  :)

[edit]
"Technical Note: Due to the fact that distance, getpos and setpos commands do not work on mines..."

errr - roger that. then use the distance-function with the inv helipads. if the mission maker gives mines a name, can you camdestroy the mines then ?
« Last Edit: 13 Oct 2002, 19:43:17 by DrStrangelove »

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:You... could be Mine
« Reply #2 on: 17 Oct 2002, 01:40:50 »
Thanks for your ideas DrStrangeglove

As far as I know, most commands won't work on mines for some reason... though I haven't tried deletevehicle/camdestroy.

The method I have in there at the moment seems to work almost all the time (I've only seen the guy get "pushed off" the mine once in the 60 odd times I've run the thing)...

I-RZ#

  • Guest
Re:You... could be Mine
« Reply #3 on: 22 Oct 2002, 13:48:00 »
Sounds a bit like Minesweeper in OFP, 3D ;D ;)

Sniper_Kyle

  • Guest
Re:You... could be Mine
« Reply #4 on: 25 Jul 2003, 20:35:30 »
I was just browsing the forums and I thought maybe this would work for this...

mine.sqs

_engineer = _this select 0
_mine = _this select 1
_distance = _this select 2

#check
_engineer distance _mine <=_distance : goto "disarm"
goto "check"

#disarm
_engineer switchmove "CombatToPutDown"
~5
deletevehicle _mine
_engineer switchmove "PutDownToCombat"
~2
goto "exit"

#exit
exit

End of script


I dont know if this will work (i haven't tested it and it is my first public script) and i dont know if this is just like the first one because it is deleted and i cant see it.  I hope this helps.

CHeErs,
   Sniper_Kyle ;D

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:You... could be Mine
« Reply #5 on: 26 Jul 2003, 04:36:07 »
By golly... here's an old thread...

Looks like the attachments don't stay around all that long either... ;)

Hey Sniper_Kyle...

The problem with your script is that it only specifies one mine and one engineer. As mine fields tend to have more than one mine, you begin to run into problems ;)

Also, OFP has problems dealing with mines directly as an object (don't ask me why). I got around that by co-locating an invisible H with every mine in the mine field, and using that as a position reference instead.

Anyway, the code is finished and works well. I'm happy to post it up if you are interested in it?

Sniper_Kyle

  • Guest
Re:You... could be Mine
« Reply #6 on: 27 Jul 2003, 01:10:13 »
Sure Sui, go ahead and post that.  I'd love to take a look at it.  I am not an advanced scriptor in the field of minefields, but maybe I can learn more

Sniper_Kyle

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:You... could be Mine
« Reply #7 on: 27 Jul 2003, 03:41:01 »
Here you go...

This script is pretty much pulled straight from one of my missions, so isn't hugely user friendly...

I'm happy to explain it further or answer any questions you might have though ;)


[size=0.5]Edit: Whoops! Conversion bug... should be working properly now...[/size]
« Last Edit: 27 Jul 2003, 03:54:35 by Sui »

Sniper_Kyle

  • Guest
Re:You... could be Mine
« Reply #8 on: 28 Jul 2003, 23:59:59 »
It's ok if it isn't user-friendly...I'll probably learn supthin, testing now.

ChEeRs,
    Sniper_Kyle ;D

Kyle

  • Guest
Re:You... could be Mine
« Reply #9 on: 21 Aug 2003, 00:38:29 »
I like the script, it is kinda cool how when you see the mine and mark it, the little caution sign appears.  I just think that the caution sign should be maybe on the mine or closer to it. I'm gonna take a look at the sqs and try to see how it done.

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:You... could be Mine
« Reply #10 on: 21 Aug 2003, 02:46:00 »
You could make it so it is... just change the lines that look like this one:

Code: [Select]
? (count markRA) == 0: s0 = "Danger" createvehicle (getpos _squaddie); s0 setdir (random 360); signRA = signRA + [s0]
To this:

Code: [Select]
? (count markRA) == 0: s0 = "Danger" createvehicle [0,0,0]; s0 setpos (getpos _squaddie); s0 setdir (random 360); signRA = signRA + [s0]
The reason I didn't do that is because I don't reckon you'd want to put the marker that close to the mine... but whatever floats your boat mate ;D

Kyle

  • Guest
Re:You... could be Mine
« Reply #11 on: 21 Aug 2003, 03:36:38 »
Thx Sui, I'm already trying to think of different missions to make with this (of coarse give you credit)! ;D  Also, have you tried my new car bomb script? Just d/l from the 15th message on my post!

ChEeRs,
    Sniper_Kyle  ;D

Tinky the target

  • Guest
Re:You... could be Mine
« Reply #12 on: 13 Sep 2003, 02:18:00 »
Sorry to just jump in here....

But i was looking and I dont know much about scripting and stuff....how would you change this script so that it just shows up the mines as you get near them...but thats all.

e.g as part of a mission, the mines could be used to make an area not passable...as in making the player go round the area....

any help is appreciated