Forum Jump :

Author Message


Posts: 2
Rank:


Level: Member

Country: at
Location: Innsbruck
Occupation:
Age:
In-game name: [AoD]ClawOfLight

 
#1 Posted at 2012-07-15 15:12        
     
Hi, I have been playing around with the simple IED script by Jeevz, and I really liked the easy proximity IED's. Since my Clan wants to minimize the number of mods, I may only use ACE and RQ-11 Raven - so I cannot use the EOD mod, at least until now. If it is easily feasible, I would enjoy any help with my questions; if not, never mind, and I'll try to get clearance for the use of the EOD mod - even more so because my questions are kinda noobish, and not important in any way, except that I would like to have the knowledge^^ .

QUESTIONS:

1. Is it possible to exempt the US engineer from the trigger - maybe even only if he crouches, or crawls - , so that he can approach the IED and disarm it?

2. How would I make an disarm Action for the engineer, say using addAction, "(_target distance _this) < 3" as argument, and maybe deleteVehicle?


Author Message


Posts: 1484
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#2 Posted at 2012-07-15 16:33        
     
I haven't looked at simple IED.

If you use the following in a trigger it will only activate if the unit is not engineer or he's standing, you can get him to the bomb by crouching but you need to move very slowly, prone is ok.

Cond
typeof (thislist select 0)  != "USMC_SoldierS_engineer" or ((thislist select 0) selectionPosition "launcher" select 2) > 1.2


on act
I'm not sure what you'd put here to activate the actual bomb your using as I haven't seen the script.


Addaction would be the following added to the IED
this addaction ["Disarm Bomb", "yourscript.sqf",T_Bomb1, 0, true, true,"", "(_this distance (_target)) < 2 "];

You will also need to name the trigger and pass that to the script through the addaction because if you don't the trigger will still be active. Trigger named T_bomb1

script could look like this
Hint "Wow!!";
sleep 2;
hint "This could take a while";
sleep (random (4)+6);
Hint "Done it";

deletevehicle (_this select 0);// delete bomb
deletevehicle (_this select 3);// delete trigger


Advertisement


Author Message


Posts: 23
Rank:


Level: Member

Country: us
Location:
Occupation: MECH. ENGR. STUDENT
Age:
In-game name: grimbah

 
#3 Posted at 2013-02-19 10:49        
     
Im new to mission editing so maybe there is something im not quite seeing here :-(

From my understanding, these snippets will make it so if a vehicle passes the "ied" the trigger will activate and boom, but if an engineer goes up to the "ied," he will get an action to disarm it via a short script.

I've tried melding the disarm script i want to use with your example but to no avail.

What i would like to do is:
    1. Detonate the IED if a vehicle passes by it.

    2. If the vehicle spots it before passing, an engineer can go up to it (or rifleman can slowly duck walk or slide up to it) and disarm it so the vehicle can pass by un-exploded.

Here's whats in the script .sqf (Thank you author ;D ):
//////////////////////////////////////////////////////////////////
// Function file for Armed Assault
// Created by: TODO: Author Name
//////////////////////////////////////////////////////////////////

_object = _this select 0;
_type = typeof _object;

if (_object isKindOf "ied") exitWith {};

_object removeAction 0;

Hint "Defusing...";
sleep 5;
if ((random 10) <=1) then {bomb="Bo_GBU12_LGB" createVehicle [(getPos _object select 0),(getPos _object select 1),0]} else {Hint "Defused!!!"};

with this in the object initialization field:
this addAction ["Disarm Bomb", "Defuse.sqf", trigger1, 0, true, true, "", "(_this distance (_target)) < 2 "];

and this bit in the trigger condition field (Infantryman9 is the class name for a US CRYE skin):
typeof (thislist select 0)  != "Infantryman9" or ((thislist select 0) selectionPosition "launcher" select 2) > 1.2

and this in the on activation field:
bomb="Bo_GBU12_LGB" createVehicle [(getPos car select 0),(getPos car select 1),0]

For clarity, the triggers activation is set to NONE, which is, I'm assuming, what you would want since your declaring which objects you dont want activating it.

Any suggestions?


Author Message


Posts: 1484
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#4 Posted at 2013-02-19 16:50        
     
It all seems to work as is.
Trigger needs to be set to the side you want to kill or anyone present.


I'm not sure about this as I haven't seen class "ied" it always seems to be false.
if (_object isKindOf "ied") exitWith {};

infact you could remove the unit check from the trigger and move it to after you start to disarm the ied.
if your not an engineer it would increase the risk of it detonating.


Author Message


Posts: 23
Rank:


Level: Member

Country: us
Location:
Occupation: MECH. ENGR. STUDENT
Age:
In-game name: grimbah

 
#5 Posted at 2013-02-19 22:43        
     
so its to the point that the ai with a classname "Infantryman9" wont activate the trigger, but a player with the same classname will activates the trigger and blows up. How would i make it so any player that's an "Infantryman9" wont activate the trigger?


Author Message


Posts: 1484
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#6 Posted at 2013-02-20 00:01        
     
How do you have the trigger setup, as both player and AI will trigger it if they're not keeping low.


Author Message


Posts: 23
Rank:


Level: Member

Country: us
Location:
Occupation: MECH. ENGR. STUDENT
Age:
In-game name: grimbah

 
#7 Posted at 2013-02-20 00:40        
     
Im retarded. I was crouched walking into the trigger instead of crawling (need to change the last part of the condition statement to allow for a crouched approach i think). Although, because its an 'or' statement and not an 'and' shouldn't i be able to crouch walk or even walk up to it with the engineer?

And that suggestion you made about putting the check in the script, brilliant! Thankyou *DRINK*


Author Message


Posts: 1484
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#8 Posted at 2013-02-20 00:44        
     
Crouching will work if you just dab the key very slightly.


As the trigger is now

any unit not "Infantryman9" will cause it to explode.
or
any unit not crouching or crawling it will cause it to explode.

Hope that clears it up a bit.

This post was edited by F2kSel (2013-02-20 00:52, ago)


Author Message


Posts: 23
Rank:


Level: Member

Country: us
Location:
Occupation: MECH. ENGR. STUDENT
Age:
In-game name: grimbah

 
#9 Posted at 2013-02-20 01:42        
     
Got it. But now that ive tried messin around with my script i find it not working..

heres what i have:
if typeof (thislist select 0)  != "Infantryman9" 
then {
	_object = _this select 0;
	_type = typeof _object;
	
	_object removeAction 0;

	Hint "Defusing...";
	sleep 5;
	if ((random 10) <=1) then {bomb="Bo_GBU12_LGB" createVehicle [(getPos _object select 0),(getPos _object select 1),0]} else {Hint "Defused!!!"};

	deletevehicle (_this select 0);// delete bomb
	deletevehicle (_this select 3);// delete trigger
	}
	
else {
	
	_object = _this select 0;
	_type = typeof _object;
	
	_object removeAction 0;

	Hint "Defusing...";
	sleep 5;
	if ((random 10) <=5) then {bomb="Bo_GBU12_LGB" createVehicle [(getPos _object select 0),(getPos _object select 1),0]} else {Hint "Defused!!!"};

	deletevehicle (_this select 0);// delete bomb
	deletevehicle (_this select 3);// delete trigger
	};

Your thoughts?


Author Message


Posts: 1484
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#10 Posted at 2013-02-20 16:17        
     
nearly right, where passing data to the script through addaction so thislist won't work here.
I also just re arranged the order and value as it kept going off too much for me.



if (typeof (_this select 1)  == "Infantryman9")  
then {
	// engineer
	_object = _this select 0;
	_type = typeof _object;
	
	_object removeAction 0;

	Hint format ["%1 Is Defusing...",typeof (_this select 1)]; 
	sleep 5;// 80% chance
	if ((random 10) <=2) then {bomb="Bo_GBU12_LGB" createVehicle [(getPos _object select 0),(getPos _object select 1),0]} else {Hint "Defused!!!"};

	deletevehicle (_this select 0);// delete bomb
	deletevehicle (_this select 3);// delete trigger
	}
	
else {
	// amature
	_object = _this select 0;
	_type = typeof _object;
	
	_object removeAction 0;

	Hint format ["%1 Is Defusing...",typeof (_this select 1)];
	sleep 5;// 50/50 chance
	if ((random 10) <=5) then {bomb="Bo_GBU12_LGB" createVehicle [(getPos _object select 0),(getPos _object select 1),0]} else {Hint "Defused!!!"};

	deletevehicle (_this select 0);// delete bomb
	deletevehicle (_this select 3);// delete trigger
	};


Author Message


Posts: 23
Rank:


Level: Member

Country: us
Location:
Occupation: MECH. ENGR. STUDENT
Age:
In-game name: grimbah

 
#11 Posted at 2013-02-20 22:54        
     
Ah i see, thank you. Im excited to see what this script will do in game.

Just from looking at it tho, that's pretty cool what you did with the hint there, having it display the person whos disarming it. I tried something like that but arma isnt quite exactly like matlab haha i tried fprintf, which did not work at all haha.