Jump to content
nikiller

Nikiller's scripts pack

Recommended Posts

Nikiller,

I added new dummy units for resistance, west, and east and now it works great!!

I can see how this script could be really flexible and fun to use--especially in advance and capture style missions. For example, if you wanted the player to capture three towns in successive order, you could create three UPS zones and multiple spawn points per city. Then you could create a big trigger that would execute the spawn script when the player got a certain distance from the city! Muahahahah! :cool:

Would you be able to add this additional script that would add inifinite respawn/more respawns? That would be sooo cool because because you could specify how many "waves" of AI groups the player would have to fight through.

Thank you for your help!

Share this post


Link to post
Share on other sites
This script delete trigger after activation. It saves a lot of performance.

...

NB: Never use this this script with repeatidly trigger.

Just wondering, why shouldn't I use it on triggers activated repeatedly? Didn't notice anything harmful in it.

Share this post


Link to post
Share on other sites

hi,

Just wondering, why shouldn't I use it on triggers activated repeatedly? Didn't notice anything harmful in it.

You are right it technically deletes repeatedly trigger but your trigger will not work anymore after it has been deleted. Let's say you have a minefield in a tigger set to repeatedly, if a unit activate it and the trigger is deleted after activation your minefield will be deactivated and others units will be able to walk in the minefield without problem. Another example, if you use repeatedly trigger to count if one side dominate the other in a town the trigger will be deleted after the first activation and will not do his count job anymore. Of course, you can delete repeatedly triggers, but ONLY if you don't need it anymore.

I made a little demo with the minefield example to show how it works: DEMO LINK

@Blitzen: Sorry mate I forgot about you request. I had a look and unfortunetly I fail to find a way to add more respawn to spawnsquad.sqf. For that I will have to write another spawning script from scratch.

cya.

Nikiller.

Share this post


Link to post
Share on other sites

Hey Nikiller,it seems that link for demo dont work anymore(at least for d-day mg,and tank firing in defined area),so can you reupload them,or give another link?

Share this post


Link to post
Share on other sites

hi,

Hey Nikiller,it seems that link for demo dont work anymore(at least for d-day mg,and tank firing in defined area),so can you reupload them,or give another link?

Done. Thanks for reporting dead links.

cya.

Nikiller.

Share this post


Link to post
Share on other sites

Whoa! That was FAST! But(there must be at least one BUT...) it seems that the other links arent working as well... :butbut:

Share this post


Link to post
Share on other sites

Nikiller, I also wondered if you could fix all the dead links. Thanks in advance.

Share this post


Link to post
Share on other sites

hi,

I will check all links one by one tomorrow and fix them if needed.

cya.

Nikiller.

Share this post


Link to post
Share on other sites

hi,

I think all links work now. Say me if not.

I will post new scripts soon.

cya.

Nikiller.

Edited by Nikiller

Share this post


Link to post
Share on other sites

Thanks. Great scripts. Wish there were other scripts to reduce ai accuracy (I've posted this in another thread) aside form HD.

Share this post


Link to post
Share on other sites

hi,

This script spawn a random minefield in a square. You can see the mines then you can avoid them and cross the minefield if you are careful. You can set the size of the square and the mines number. If one of the victim defined in the array is less than 1m from the mine it will blow up and shrapnels will be ejected around. I tested it with a 100x200 square and 500 mines without too much performance impact. This script can easily be used with mine addons like CoC.

mini_389521nikiminefield.jpg mini_365263nikiminefieldcoc.jpg

Addon needed: N/A

Addon suggested: CoC mines

Version: 1.0

By: Nikiller

Credits: Nikiller

MP compatable: Yes

Required version: OFP 1.96 or CWA (ofp 1.99)

Description: This script spawn a random minefield in a square. You can set the size of the square and the mines number

installation: put the misc folder in your mission folder.

Note:If you want a lot of mines it could take a bit time to spawn (0.1sec/mine)

init.sqs

;********************************
;Init Script by Nikiller v0.9b
;contact: nikillerofp@hotmail.fr
;[] exec "scriptName.sqs"
;********************************

nik_host=local server
nik_players=[p1,p2]

;-----------------------------------------------------------------------------------------
; AP mine
;-----------------------------------------------------------------------------------------
nik_finzone=preprocessFile "misc\minefield\inzone.sqf"
[gl_minefield,50,25,100] exec "misc\minefield\build_minefield.sqs"

exit

ap_mine.sqs

;**************************************
;AP mine Script by Nikiller v0.9b
;Blow when an array of units is < 1m
;Note: place a game logic named server
;contact: nikillerofp@hotmail.fr
;[unitName] exec "scriptName.sqs"
;example: [mine1] exec "scriptName.sqs"
;**************************************

if nik_host then {} else {goto "ende"}

_m = _this select 0

_exp=getPos _m
_cx=_exp select 0
_cy=_exp select 1
_ammotype1="GrenadeHand"
_ammotype2="BulletSingleW"
_i=0
_j=20
_d=0.1
_dist=1

#check
~_d
if (([nik_players,_m,_dist] call nik_finzone) || !(alive _m)) then {_m setPos [0,0,0]} else {goto "check"}

_boom=_ammotype1 createVehicle _exp

#shrap
_step=random 360
_dist=1+random 10
_rx=_cx+_dist*sin _step
_ry=_cy+_dist*cos _step
_rheight=0

_shrapnel=_ammotype2 createVehicle [_rx,_ry,_rheight]
_i=_i+1
~_d
if (_i<_j) then {goto "shrap"}

#delete
~1
deleteVehicle _m

#ende

exit

build_minefield.sqs

;*******************************************************
;Build minefield Script by Nikiller v0.9b
;spawn random AP mines in defined area
;Note: place a game logic named server
;contact: nikillerofp@hotmail.fr
;[unitName,axisx,axisy,mineNumber] exec "scriptName.sqs"
;example: [gl1,1600,500,500] exec "scriptName.sqs"
;*******************************************************

if nik_host then {} else {goto "ende"}

_u  = _this select 0
_sx = _this select 1
_sy = _this select 2
_nu = _this select 3

_ap="bomb"
_pu=getPos _u
_d=0.1
_i=0
_j=_nu
_l="l"
~5

#l
~_d
_cx=_pu select 0
_cy=_pu select 1
_cz=_pu select 2
_cx=_cx+random _sx
_cy=_cy+random _sy
_cz=0
_mine=_ap createVehicle [_cx,_cy,_cz]
_mine setDir random 360
[_mine] exec "misc\minefield\ap_mine.sqs"
_i=_i+1
if (_i<_j) then {goto _l}

#ende

exit

inzone.sqf

// in_zone

private [{_u_ar},{_obj},{_dis},{_zone},{_c},{_i}];

_u_ar = _this select 0;
_obj  = _this select 1;
_dis  = _this select 2;

_zone=false;
_c=count _u_ar;
_i=0;
while {(_i < _c) and (not _zone)} do
{
	_u=_u_ar select _i;
	if (alive _u) then
		{
			if ((vehicle _u) distance _obj < _dis) then
				{
					_zone=true;
				};
		};
	_i=_i+1;
};

_zone

Here's a demo to show how it works: DEMO LINK

cya.

Nikiller.

Edited by Nikiller

Share this post


Link to post
Share on other sites

Good stuff.

Coincidentally, I was finally going to script some IED stuff for WW4 EXT but this might save me some work.

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

×