Jump to content
Sign in to follow this  
DEMONIAC

scripting

Recommended Posts

can someone wright me a script to spawn a group of six people when i blow up a building....

with the names ..mia0..mia1..mia2....you get the idea

i will use this script a nummber of times in this mission

this script allso need to know that if the group

is allready spawnd to just respawn the same group

at the new posion of the building that wuz just blew up

i have no idea of C..... im just learnig and i realy realy need this to complet my mission

Share this post


Link to post
Share on other sites

For the following script to work you have to create

the sic soldiers mia0, mia1,... in the editor and put

them far away from the battlefield (on a small island

maybe). Calling the following script like

[x,y,z] exec "spawn.sqs" will spawn the six soldiers

around the position [x,y,z].

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;[x,y,z] exec "spawn.sqs"

_x = _this select 0

_y = _this select 1

;these commands simply place the soldiers

;around [x,y,z]

mia0 SetPos [_x, _y, 0]

mia1 SetPos [_x+2, _y, 0]

mia2 SetPos [_x-2, _y, 0]

mia3 SetPos [_x, _y+2, 0]

mia4 SetPos [_x, _y-2, 0]

mia5 SetPos [_x+2, _y-2, 0]

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

I actually don´t know how to trigger the event

of blowing up a building (do you mean special

buidlings or any building on the map). For special

buidlings try to use Gunslingers addon to create

namedn buildings and check their damage like

GetDammage buildingname >= 1.0

-----> activate trigger with action

(GetPos buildingname) exec "spawn.sqs"

Hope this helps,

Spinor

Share this post


Link to post
Share on other sites

yes im useing Gunslingers Addons for the buildings

but my scripting abilitys is very poor i try but cant get it right...sad.gif

i would tell you more of my mission but ive been burnt

by peps before and some great ideas i have hade have been stollen and missions made and put out way before i could evan get the first script made....i am asking if someone that knows how to make scripts can make it for me ...not sure how i could repay you for doing it but

i might be able to help with something....

thanks for the input on this subjet spinor just one thing

what is the +2....-2 for in the setpos commands

Share this post


Link to post
Share on other sites

The +2, -2 are just an offset of two meters, otherwise all soldiers are spawned at exactly the same position. You can put any numbers in there, making the spread larger or smaller as you like it.

Spinor

Share this post


Link to post
Share on other sites

information well needed but i just cant do it on my own

ive tryd again and again i cant get it.........

hhhhhhhheeeeeeeeeeeeeelllllllllllllllppppppppppppp

Share this post


Link to post
Share on other sites

shurly someone here knows how to do this.....

hhhhhhheeeeelllllllpppppp

please!!!!!!!

Share this post


Link to post
Share on other sites

come on guys i realy need this .............

anyone?confused.gifconfused.gifconfused.gifconfused.gif???if you would like to see what im working on and can help... icq me and ill send you the mission......TO HELP ..........and give you more info on what im trying to do here im onley looking for one person to help if you cant help please dont icq me

Share this post


Link to post
Share on other sites

been there done that.............i found some respawn scripts to change places of respawn but this is not what i wana do

i wana spawn a group when a building is blowd up

you guys remember that old atarie game called

chopper lifter or chopplifter ............

Share this post


Link to post
Share on other sites

K it took a while but here it is:

===================================

;//[mia1,mia2,mia3,mia4,mia5,mia6,bomb1] exec "spawn.qsq"

;//scripted by Da Frank

;

;//assigns bomb1 as the Target (something like a M2 machinegun)

_bomb1 = _this select 0

;//assigns mia's as the survivors

_mia1 = _this select 1

_mia2 = _this select 2

_mia3 = _this select 3

_mia4 = _this select 4

_mia5 = _this select 5

_mia6 = _this select 6

;// blowup bomb1

_bomb1 setdammage 1

;//find Target position

_position = getpos _bomb1

_x = _position select 0

_y = _position select 1

_z = _position select 2

;//sets your bomb1 in the ground (so it's not visable anymore)

_bomb1 setpos [_x,_y,_z-5]

;//take some time before getting new position (otherwise you blow up your mia's)

~10

;//spawns your miagrp in the house (this might involving shifting the bomb1 around)

_mia1 setpos [_x,_y,0]

_mia2 setpos [_x,_y+2,0]

_mia3 setpos [_x,_y-2,0]

_mia4 setpos [_x+2,_y,0]

_mia5 setpos [_x+2,_y+2,0]

_mia6 setpos [_x+2,_y-2,0]

~10

;//moves your mia1 (and the rest will follow if in the same group) out of the building

_mia1 move [_x+10,_y+10,0]

;//the end

exit

============================

notes:

I designed it so that you don't have to know any coordinates just place your M2 (named bomb1) in a house, again this might take some shifting around.

All your men will then be spawned in the house, and i added a littel movement so they will come out.

Have fun

Share this post


Link to post
Share on other sites

Thanks Da Frank

I will use this for sure.

Hoz

Share this post


Link to post
Share on other sites

NP

Just started making my first scrip yesterday, and I'm allready hooked smile.gif

Share this post


Link to post
Share on other sites

COOL man thanks this is exaclty what i needed

your my hero ...hehehehe...thanks thanks thanks ........

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×