Home   Help Search Login Register  

Author Topic: Scripting ideas  (Read 767 times)

0 Members and 1 Guest are viewing this topic.

GaryP

  • Guest
Scripting ideas
« on: 15 Aug 2003, 14:38:09 »
Ok.  I'm new at this, so please forgive me.

Can Satchel Charges be scripted?  Im thinking of a situation where you have to plant a bomb and get out of Dodge before it goes off, but I need more then 30 seconds, and I don't want to manually touch it off.  

I'll have 20 or so already placed around the town with a trigger counter, for a big bang effect.

Can this be done?  I searched for Satchel Charges, and found a mess of stuff, but this was not one of them.

notmucheyecandy

  • Guest
Re:Scripting ideas
« Reply #1 on: 15 Aug 2003, 14:46:33 »
when you plant a stachel charge you have 2 options:

just plant it and move on, you can detonate it remotely later
set the timer, it goes up in 30sec blocks, so if you keep hitting the set on timer action it will give you more time
« Last Edit: 15 Aug 2003, 14:47:00 by notmucheyecandy »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Scripting ideas
« Reply #2 on: 15 Aug 2003, 15:06:44 »
If you're talking about AI laying satchels, then the answer is yes, you can script it.

Can't remember the details but I think you use the fire command to get the loon to place his charge(s) and action "touchoff" to make him set them off.

Game code sometimes refers to them as pipebombs, as opposed to timebomb which is a satchel on a timer.    Probably.
Plenty of reviewed ArmA missions for you to play

Offline Burn

  • Members
  • *
Re:Scripting ideas
« Reply #3 on: 15 Aug 2003, 16:08:09 »
Ok... If I understand you correctly here GaryP, you could camcreate some LGB's @ some key positions, just turn a variable true with a trigger with the appropriate delay to set off a litle script...
Why use LGB's instead of Satchel Charges You ask?!?
Well simply because you can't touch off Satchel Charges that you've camcreated... atleast I haven't heard\read of a way to do that. And they are about as powerful as a satchel charge, if not even more powerful.

There is three possible names for the LGB (I'm not shure wich one's the correct one here), so you'll have to test them out. Or maby someone else could post the corect name here...

"Laserguidedbomb"
"Laserguidedbomblauncher"
"bomb"

the correct syntax should be:
Bomb="Laserguidedbomb" CamCreate [X,Y,Z]
or with a marker:
Bomb="Laserguidedbomb" CamCreate(GetMarkerPos "marker")
I'm not 100% shure if "marker" should be in quotes or not but I think so.

but if none of those LGB-names work you could use "Shell125" from the T80 main gun.

Bomb="Shell125" CamCreate [X,Y,Z]
or with a marker:
Bomb="Shell125" CamCreate(GetMarkerPos "marker")

Or if I just have wasted both yours and my time here and given you the wrong answer, ;D here is the crrect syntax for AI Satchel Charge placement...
==============================================>
to put a bomb
UNITNAME fire ["put", "pipebomb"]

detonate charges:
UNITNAME action ["touchoff"]
==============================================>
 :joystick: :beat: :tomato: :gunman:

[EDIT]
===============================================>
NEWSFLASH, NEWSFLASH READ ALL ABOUT IT!!!!
[/b][/i][/u][/size]===============================================>
I searched the forums, and according to MI_Fred the correct name for the LGB should be:
                                "LaserGuidedBomb"
« Last Edit: 15 Aug 2003, 16:33:22 by Bizon »

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:Scripting ideas
« Reply #4 on: 15 Aug 2003, 16:43:45 »
it is  ;)
Not all is lost.

Iwesshome

  • Guest
Re:Scripting ideas
« Reply #5 on: 15 Aug 2003, 17:29:02 »
I never got around to asking this question so now I shall...

How do you easily find the [X,Y,Z] coordinates?

Offline Burn

  • Members
  • *
Re:Scripting ideas
« Reply #6 on: 15 Aug 2003, 17:42:56 »
Use camera.sqs... Do you know how to use camera.sqs?
If not check out the camera.sqs tutorial by Messiah

Or make a trigger:
Activation: RadioAlpha(0-0-1.)
On Activation: hint format ["%1", getpos Player]

this should display your position as an hint message :beat:
 :toocool:
« Last Edit: 15 Aug 2003, 17:47:02 by Bizon »

Iwesshome

  • Guest
Re:Scripting ideas
« Reply #7 on: 15 Aug 2003, 17:57:02 »
Thanks....  ;)

Offline Burn

  • Members
  • *
Re:Scripting ideas
« Reply #8 on: 15 Aug 2003, 18:01:19 »
Anytime :toocool:
 :cheers:

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Scripting ideas
« Reply #9 on: 15 Aug 2003, 18:17:05 »
There's a grid-square to xz conversion table in the Tutorials.
Plenty of reviewed ArmA missions for you to play

GaryP

  • Guest
Re:Scripting ideas
« Reply #10 on: 15 Aug 2003, 21:53:13 »
Here's what I was thinking.  It gos something like this:

"Good morning sir".  "You have 30 min. to get into the town and place 3 charges"  

Of course the 3 charges are not enough to blow up the whole town, so I thought I'd add a few...  And trigger them off the 3.

Am I going in the wrong direction on this?   Is there a better way?

Offline Burn

  • Members
  • *
Re:Scripting ideas
« Reply #11 on: 16 Aug 2003, 00:44:17 »
Ok... the only way that I come to think off, would be to have a script that checks for the action to put down Satchel Charges, and when the player has planted three bomb's, a timer would activate and start counting down.
And when the time runs out, maby the script could force the player to detonate the bomb's, not guaranteed that forcing the player would actually work. But I don't think that it's nessecary anyway. You could just camcreate those LGB's here n' there, and some ontop of those satchel charges, and hopefully they'll be destroyed too. Unfortunetly I don't have the knowledge, time or strength right now :(... I've been sitti'n in front of this damned computer ever since I came home, my eyes are bloodred now and I need to get some sleep... For me to solve this for you, I would need to do som extencive research... but there are others that can help you much better than me... that I know... :)
« Last Edit: 16 Aug 2003, 00:49:32 by Bizon »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Scripting ideas
« Reply #12 on: 16 Aug 2003, 01:22:21 »
You could just setdammage 1 all the buildings in the town when the charges go off.    Click on Show IDs in the mission editor and zoom right in to see ID numbers.   Then

"_x setdammage 1" forEach [object 1234, object 4567]

syntax not guaranteed.

Don't use satchels if you just want to make a big bang.   LGBs or shells are easier to use.  

Plenty of reviewed ArmA missions for you to play