OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: bigskill on 28 Oct 2003, 19:37:32
-
Guys can you help me.
I am making a mission where is it at night and i want the sky to be lit up with flares, how do i script so that there are flares shoot up in the air one after the other? hope you can do it :D
thanks :-\
-
_flaremkr = _this select 0
;_flaremkr is a gamelogic
#Vars
_flarepos = getpos _flaremkr
_fx = _flarepos select 0
_fy = _flarepos select 1
_fz = _flarepos select 2
flarestop = 0
#Loop
?(flarestop == 1): goto "exit"
_flare = "flare"
_flare camcreate [_fx,_fy,(_fz + 150)]
~10
goto "loop"
#exit
exit
-
k i am a total n00b (sort of) where do i put all this in? :-[
-
Create a game logic called "FlareMarker" without the quotes, its under Game Logic\Objects\Game logic
Put it where you want the flares
Alt Tab into windows and goto to flashpoint\Users\(your charachter name)\missions\(whatever you called the map)
Create a text document called "flare.txt" without the quotes, then open it and copy the code posted by "M21 Man" into it, save and exit.
Then sellect, (not open) the "flare.txt" and hit F2 (rename), change the .txt part to .sqs
Back in the game double click on the player and put in the init line ([FlareMarker] exec "Flare.sqs") without the brackets.
Then create a trigger, activated by Radio alpha, put in the init line of this "flarestop = 1" without the quotes.
And finaly Read Snipers Introduction to scripts, half way down this page, http://www.ofpec.com/editors/index.php
And remember, if you dont no the answear then no question is to stupid to ask
-
k cool thanks guys i will try it later on ;D i am just going out now
cheers :D