OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: GodHatesUsAll on 15 May 2003, 04:02:53
-
NO, this is not "HOW DO I CALL AN AIRSTRIKE".
I need to know how to make bombs drop wherever my smokeshell lands.
Example:
Return to Castle Wolfenstien MP. How the officer can throw a smoke shell, then bombs land at that area.
So, say i, the officer, throws a smoke shell, then some grenades will explod around the smokeshell, randomly.
Ive seen it in an OFP MP mission, but have no idea how to do it...
-
where the shell lands?! hmm, well honestly, I've never tried this particular thing (does ppl do that - throw smoke and then a bird comes in and start dropping eggs?? odd.)
well, nevermind m8 :) whatever...
I think ya should have a looksie in the "Ed.Depot" :-* p'haps a "missile detection" sort of scroll is what you're looking for?!
-
The script should look kinda like this. (Not sure about this)
_Bombarea = NearestObject [_man,"Smokeshell"]
#check
@_man ammo smokeshell == 0
~10
shell1 = "Shell120" camcreate [(getpos _bombArea select 0) + 1, (getpos _bombArea select 1) + 2, getpos _bombarea select 2]
shell2 = "Shell120" camcreate [(getpos _bombArea select 0) + 2, (getpos _bombArea select 1) + 2, getpos _bombarea select 2]
shell3 = "Shell120" camcreate [(getpos _bombArea select 0) - 1, (getpos _bombArea select 1) + -1, getpos _bombarea select 2]
shell4 = "Shell120" camcreate [(getpos _bombArea select 0) - 2, (getpos _bombArea select 1) - 2, getpos _bombarea select 2]
~10
goto "check"
-
yea, that looks fine :D 8) .....except from.... who is _man ???
-
Shit!
Chears dude!
Where _man is, can that be replaced with the Officers name?
For example _officer1
?
-
Hmmm, getting an error:
_Bombarea = NearestObject [_man,"Smokeshell"]|#|': Error 0 elements provided, 3 expected
Where do i exec this script?
Will it work in MultiPlayer if the Officer respawns?
Whats the _man bit for?
-
Knut erics script goot som basic flaws :P
u didnt defind who is man ::)
nd
@_man ammo smokeshell == 0
wat hapens if he have more dan 1 smokeshell ? ::)
but u can try dat
in da init of da man put
this addeventhandler ["Fired","_this exec {scriptname.sqs}"]
now da script named scriptname ::) do
_man = _this select 0
_shel = _this select 1
? _shel != "smokeshell" : exit
_Bombarea = NearestObject [_man,"Smokeshell"]
~10
shell1 = "Shell120" camcreate [(getpos _bombArea select 0) + 1, (getpos _bombArea select 1) + 2, getpos _bombarea select 2]
shell2 = "Shell120" camcreate [(getpos _bombArea select 0) + 2, (getpos _bombArea select 1) + 2, getpos _bombarea select 2]
shell3 = "Shell120" camcreate [(getpos _bombArea select 0) - 1, (getpos _bombArea select 1) + -1, getpos _bombarea select 2]
shell4 = "Shell120" camcreate [(getpos _bombArea select 0) - 2, (getpos _bombArea select 1) - 2, getpos _bombarea select 2]
exit
shud work ;) - but i didnt try so tel us ;D
LCD OUT
-
Ooops.. ::)
Sorry for not giving you the correct info, GodHatesUsAll
Anyway, LCD's script looks MUSH better than mine ;)
-
No Errors, but it doesnt work :/
I throw the smokeshell, and nothing happens....
-
Try camcreating 2 shells at each location, so that they collide and explode.
-
I had to modify the script a little, but here ya go! ;)
I've created an exsample mission for you to play with.
Also I've added a cool smoke effect that followes the shells from the sky! :o 8) :o
CRAP! You can't post .rar files, so I have to pbo it. (Use de-pbo to see how I did.)
-
Cheers dude!
Ill give it a try!
-
Ok, now for some reason, when my guy fires a gun, it exec's the script for however many times i fire.
So for example, if i fire 5 times, it'll exec the script 5 times :/
Any way to get around this?
-
try dat ;D
fixed wat knut eric did ;D
LCD OUT
-
Cheers man!
Can East and West both use it?
-
yeah
LCD OUT