OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: aaronj5 on 21 Jun 2003, 08:15:16

Title: Illumination
Post by: aaronj5 on 21 Jun 2003, 08:15:16
I'm making a Mission Based on the Night part of "We were Soldiers".
I need a Script that alows the player to pick a spot on the map, and Artillerry Hits it with an Illumination Round. I'm new to Scripting, And Could use a little help here. Yes I've checked the Script Snippets, Nothing There.
Title: Re:Illumination
Post by: Ace on 21 Jun 2003, 15:34:32
OK, First familurize yourself with the camcreate command.

This command is basically a way to create anything you want anywhere at any time. Very useful.
So, using camcreate we must create a flare to illuminate the area.

Flare = "Flare" camcreate (getpos GL1 select 0, getpos GL1 select 1, getpos GL1 select 2,55)

Put this in a script or trigger signalling when you want illumination. (For example on a radio command)

Basically, a flare will be created 55meters above a unit called GL1. (A game logic preferabley as they cant be seen but any unit will suffice.)

Any more Q's about this?
Title: Re:Illumination
Post by: aaronj5 on 21 Jun 2003, 18:49:02
Well You've Answered part of my Question. What I need is something Similar to the "One-Click-Artillery" Script, Where The player holds something like Shift-Ctrl, And Clicks once on the Map, Causing an Ilumination Flare to be fired at that Posistion. How would I do that?

Thanks,
Aaronj5
Title: Re:Illumination
Post by: LCD on 21 Jun 2003, 23:01:32
in radio triger put

onmapsingleclick {Flare = "Flare" camcreate [_pos select 0,_pos select 1,55]}

didnt check it but it shud work ;D

LCD OUT
Title: Re:Illumination
Post by: aaronj5 on 22 Jun 2003, 00:06:37
Ok, That worked great. Thanks.

Title: Re:Illumination
Post by: LCD on 22 Jun 2003, 00:36:38
solve da topic ;)

LCD OUT