TKC-Community

Hacking and Art => Armed Assault 3 => Armed Assault 2 => Topic started by: skylmt666 on June 04, 2012, 06:27:22 pm

Title: General help for newbie
Post by: skylmt666 on June 04, 2012, 06:27:22 pm
I just read Topick "How to spawn box with all gear in Arma dayz" Now I want to learn how to write scripts but looking at a forum and cant found instructions, please help or give detailed instructions on how to write script to Arma 2 OA Dayz.
Thanks for a help.
Title: Re: General help for newbie
Post by: skylmt666 on June 04, 2012, 06:31:01 pm
im really hope for ur helping,because i cant find detail instruction or some FAQ s how to write a script or how to create a sqf file.
Thanks!
Title: Re: General help for newbie
Post by: c5 on June 04, 2012, 06:50:00 pm
im really hope for ur helping,because i cant find detail instruction or some FAQ s how to write a script or how to create a sqf file.
Thanks!

Write a sqf script: 1) open notepad 2) code the script 3) save it as sqf (file->save as->all files->scirpt.sqf (for instance))

You have to put somewhat effort in it on your own, how on earth can you be so inept.... Why do you expect for people with knowledge to help anyone who comes here begging shit like that to help anyone out one by one? People here ain't Microsoft's technical feedback, do you get it?

Scripting: 1) open up 'new tab' 2) google search: ArmA 2 Scripting/Scripting Commands 3) Look around in the results....

Also, a remark: The question you asked could have been answered anywhere on BIS forums for example, there are many other forums and sites releated to ArmA 2 scripting... Why on earth would you come to gamemod-apping site to ask such a question... Learn the basic concepts of ArmA 2 Scripting on your own - asking for help at such low level really shows alot about you...
Title: Re: General help for newbie
Post by: joopig on June 04, 2012, 06:52:43 pm
Write a sqf script: 1) open notepad 2) code the script 3) save it as sqf (file->save as->all files->scirpt.sqf (for instance))

You have to put somewhat effort in it on your own, how on earth can you be so inept.... What do you expect for people with knowledge to help anyone who comes here begging shit like that to help you out one by one? People here ain't Microsoft's technical feedback, do you get it?

Scripting: 1) open up 'new tab' 2) google search: ArmA 2 Scripting/Scripting Commands 3) Look around in the results....

Also, a remark: The question you asked could have been answered anywhere on BIS forums for example, there are many other forums and sites releated to ArmA 2 scripting... Why on earth would you come to gamemod-apping site to ask such a question... Learn the basic concepts of ArmA 2 Scripting on your own - asking for help at such low level really shows alot about you...
Very helpful post +1. :darkking
Title: Re: General help for newbie
Post by: skylmt666 on June 04, 2012, 06:54:59 pm
THANK U VERY MUCH
now i will try to do this
Please keep this topick at the top
its very helpfull
Title: Re: General help for newbie
Post by: c5 on June 04, 2012, 06:55:39 pm
Yeah, now we just have to wait until someone else makes a thread about 'where to find notepad's exe from'...  :wink2
Title: Re: General help for newbie
Post by: katie1992 on June 04, 2012, 06:57:04 pm
Yeah, now we just have to wait until someone else makes a thread about 'where to find notepad's exe from'...  :wink2


Care to elaborate?
Title: Re: General help for newbie
Post by: skylmt666 on June 04, 2012, 06:58:31 pm
I think it will be cool
if Admin Create topick whick called FAQ or something like this
Title: Re: General help for newbie
Post by: c5 on June 04, 2012, 06:59:44 pm
Yeah, now we just have to wait until someone else makes a thread about 'where to find notepad's exe from'...  :wink2


Care to elaborate?

C:\windows\system32\notepad.exe
Title: Re: General help for newbie
Post by: MrMedic on June 04, 2012, 07:01:07 pm
I think it will be cool
if Admin Create topick whick called FAQ or something like this


Very good idea.
Title: Re: General help for newbie
Post by: skylmt666 on June 04, 2012, 07:01:17 pm
and after that when i write all scpirt in notepad i must rename it to sqf ???
Title: Re: General help for newbie
Post by: jamesgtaiv on June 04, 2012, 07:10:09 pm
I cant help but feel like a lot of shit posted on this forum requires tons of posting effort from experienced people who could be dedicating their time to those of us that have a clue, but don't quite know how to execute.

It's a fucking bummer. All I want to do is spawn a fucking crate full of guns and nvgs!!!!!! I'm tired of reading this forum word for word when it's 50% garbage like this thread.

EDIT: Do your self a favor, OP. Play around in the editor, make short missions and gain some experience with scripting. It goes a long way!
Title: Re: General help for newbie
Post by: MrMedic on June 04, 2012, 07:14:32 pm
I cant help but feel like a lot of shit posted on this forum requires tons of posting effort from experienced people who could be dedicating their time to those of us that have a clue, but don't quite know how to execute.

It's a fucking bummer. All I want to do is spawn a fucking crate full of guns and nvgs!!!!!! I'm tired of reading this forum word for word when it's 50% garbage like this thread.

EDIT: Do your self a favor, OP. Play around in the editor, make short missions and gain some experience with scripting. It goes a long way!

To be honest that kind of attitude is going to get you no where very fucking fast.

Why dont you help him out , you seem to know how to do it .. take some stress off the 'experienced people'  :icon_thumbsup
Title: Re: General help for newbie
Post by: skylmt666 on June 04, 2012, 07:16:23 pm
Jamesgtaiv
You are not right.
Look at me i cant write a scrip,i cant do anything.
And i want to teach but i cant find FAQ or another instruction.
And now u tell me that i cant have permission to teach or what?
Title: Re: General help for newbie
Post by: jamesgtaiv on June 04, 2012, 07:39:55 pm
I cant help but feel like a lot of shit posted on this forum requires tons of posting effort from experienced people who could be dedicating their time to those of us that have a clue, but don't quite know how to execute.

It's a fucking bummer. All I want to do is spawn a fucking crate full of guns and nvgs!!!!!! I'm tired of reading this forum word for word when it's 50% garbage like this thread.

EDIT: Do your self a favor, OP. Play around in the editor, make short missions and gain some experience with scripting. It goes a long way!

To be honest that kind of attitude is going to get you no where very fucking fast.

Why dont you help him out , you seem to know how to do it .. take some stress off the 'experienced people'  :icon_thumbsup

I'm not in the business of using Google for people. The Bistudio forum has more resources and tutorials than this dude could ever dream of. It would literally take him 10 minutes of searching on Google or Youtube. Apart from that, you seem far more concerned with replying to the people that don't have a clue than those that post legitimate questions. At first, I thought you were just a douche but it's now pretty apparent: these "NUBS", like the OP, are your market. You and joopig can enjoy ripping people off for chump change, and I say more power to you, but you and a few others completely destroyed this forums credibility (at least in my eyes).

Do your ego and this forum a favor; don't go telling newer/inexperienced users to look at older posts. Sometimes we do and realize what a faggot the "guru's" can be and that could become damaging to you guys and the community.

/rant
Title: Re: General help for newbie
Post by: MrMedic on June 04, 2012, 07:52:03 pm
I cant help but feel like a lot of shit posted on this forum requires tons of posting effort from experienced people who could be dedicating their time to those of us that have a clue, but don't quite know how to execute.

It's a fucking bummer. All I want to do is spawn a fucking crate full of guns and nvgs!!!!!! I'm tired of reading this forum word for word when it's 50% garbage like this thread.

EDIT: Do your self a favor, OP. Play around in the editor, make short missions and gain some experience with scripting. It goes a long way!

To be honest that kind of attitude is going to get you no where very fucking fast.

Why dont you help him out , you seem to know how to do it .. take some stress off the 'experienced people'  :icon_thumbsup

I'm not in the business of using Google for people. The Bistudio forum has more resources and tutorials than this dude could ever dream of. It would literally take him 10 minutes of searching on Google or Youtube. Apart from that, you seem far more concerned with replying to the people that don't have a clue than those that post legitimate questions. At first, I thought you were just a douche but it's now pretty apparent: these "NUBS", like the OP, are your market. You and joopig can enjoy ripping people off for chump change, and I say more power to you, but you and a few others completely destroyed this forums credibility (at least in my eyes).

Do your ego and this forum a favor; don't go telling newer/inexperienced users to look at older posts. Sometimes we do and realize what a faggot the "guru's" can be and that could become damaging to you guys and the community.

/rant

American ?  :icon_laugh

ps you wont be getting much help in the future now will ya sonshine, youve just not only insulted the staff and everyone who could of helped you but youve also just got a vein throbbing in the side of your head lol congrats on that. :smile
Title: Re: General help for newbie
Post by: jamesgtaiv on June 04, 2012, 07:58:32 pm
I cant help but feel like a lot of shit posted on this forum requires tons of posting effort from experienced people who could be dedicating their time to those of us that have a clue, but don't quite know how to execute.

It's a fucking bummer. All I want to do is spawn a fucking crate full of guns and nvgs!!!!!! I'm tired of reading this forum word for word when it's 50% garbage like this thread.

EDIT: Do your self a favor, OP. Play around in the editor, make short missions and gain some experience with scripting. It goes a long way!

To be honest that kind of attitude is going to get you no where very fucking fast.

Why dont you help him out , you seem to know how to do it .. take some stress off the 'experienced people'  :icon_thumbsup

I'm not in the business of using Google for people. The Bistudio forum has more resources and tutorials than this dude could ever dream of. It would literally take him 10 minutes of searching on Google or Youtube. Apart from that, you seem far more concerned with replying to the people that don't have a clue than those that post legitimate questions. At first, I thought you were just a douche but it's now pretty apparent: these "NUBS", like the OP, are your market. You and joopig can enjoy ripping people off for chump change, and I say more power to you, but you and a few others completely destroyed this forums credibility (at least in my eyes).

Do your ego and this forum a favor; don't go telling newer/inexperienced users to look at older posts. Sometimes we do and realize what a faggot the "guru's" can be and that could become damaging to you guys and the community.

/rant

American ?  :icon_laugh

ps you wont be getting much help in the future now will ya sonshine, youve just not only insulted the staff and everyone who could of helped you but youve also just got a vein throbbing in the side of your head lol congrats on that. :smile

Sorry, sir. I've already given change to the other unemployed man 2 blocks down.
Title: Re: General help for newbie
Post by: MrMedic on June 04, 2012, 08:01:37 pm
I cant help but feel like a lot of shit posted on this forum requires tons of posting effort from experienced people who could be dedicating their time to those of us that have a clue, but don't quite know how to execute.

It's a fucking bummer. All I want to do is spawn a fucking crate full of guns and nvgs!!!!!! I'm tired of reading this forum word for word when it's 50% garbage like this thread.

EDIT: Do your self a favor, OP. Play around in the editor, make short missions and gain some experience with scripting. It goes a long way!

To be honest that kind of attitude is going to get you no where very fucking fast.

Why dont you help him out , you seem to know how to do it .. take some stress off the 'experienced people'  :icon_thumbsup

I'm not in the business of using Google for people. The Bistudio forum has more resources and tutorials than this dude could ever dream of. It would literally take him 10 minutes of searching on Google or Youtube. Apart from that, you seem far more concerned with replying to the people that don't have a clue than those that post legitimate questions. At first, I thought you were just a douche but it's now pretty apparent: these "NUBS", like the OP, are your market. You and joopig can enjoy ripping people off for chump change, and I say more power to you, but you and a few others completely destroyed this forums credibility (at least in my eyes).

Do your ego and this forum a favor; don't go telling newer/inexperienced users to look at older posts. Sometimes we do and realize what a faggot the "guru's" can be and that could become damaging to you guys and the community.

/rant

American ?  :icon_laugh

ps you wont be getting much help in the future now will ya sonshine, youve just not only insulted the staff and everyone who could of helped you but youve also just got a vein throbbing in the side of your head lol congrats on that. :smile

Sorry, sir. I've already given change to the other unemployed man 2 blocks down.

Lol .. +1
Title: Re: General help for newbie
Post by: skylmt666 on June 04, 2012, 08:02:54 pm
imposibruuu
Title: Re: General help for newbie
Post by: MrMedic on June 04, 2012, 08:24:45 pm
imposibruuu

Iron brew hoolahoopa ??  :icon_laugh

Title: Re: General help for newbie
Post by: skylmt666 on June 04, 2012, 10:58:17 pm
lol no:D
Title: Re: General help for newbie
Post by: The Rake on June 05, 2012, 07:07:42 am
imposibruuu

Iron brew hoolahoopa ??  :icon_laugh



IRB BRU* Get it right lad ;)
Title: Re: General help for newbie
Post by: daleeb on June 05, 2012, 12:00:47 pm
Just because this guy got shit answers, here is the exact code needed so spawn the most awesome thing possible...a Lada!!!!
Code: [Select]
nul = [10, 10, 10, "lada1"] execVM "\z\addons\dayz_code\compile\local_createObj.sqf";
vehicle player setDamage 0;
vehicle player setFuel 1;
Title: Re: General help for newbie
Post by: O_GREEN_O on June 05, 2012, 01:27:11 pm
How to show the vehicles on the map? It's possible?
Title: Re: General help for newbie
Post by: skylmt666 on June 05, 2012, 01:41:20 pm
Thanks for a script for a LADA
Title: Re: General help for newbie
Post by: MrMedic on June 05, 2012, 03:53:45 pm
imposibruuu

Iron brew hoolahoopa ??  :icon_laugh



IRB BRU* Get it right lad ;)

Made from girders. ..lad  :wink2
Title: Re: General help for newbie
Post by: failulator on June 05, 2012, 06:17:36 pm
Just because this guy got shit answers, here is the exact code needed so spawn the most awesome thing possible...a Lada!!!!
Code: [Select]
nul = [10, 10, 10, "lada1"] execVM "\z\addons\dayz_code\compile\local_createObj.sqf";
vehicle player setDamage 0;
vehicle player setFuel 1;

tried using this in DayZ to spawn vehicles, but they killed me as soon as I got in them. have also tried spawning them with using createVehicle directly, with the following code:
Code: [Select]
_location = (position player);
_className = "UH1H_DZ";
_vehi = createVehicle [_className, _location, [], 0, "CAN_COLLIDE"];
_vehi setVariable ["ObjectID", 654654, true]
but it yields the same results (vehicles blow up+kill those inside as soon as you enter any seat).  I must be missing something, does DayZ employ any sort of server side checks against vehicles, and if so, is there a way to get around them? I've looked at most of the recent threads on this forum but haven't found anything of much use, I'm a bit stuck.  :icon_confused2
Title: Re: General help for newbie
Post by: MrMedic on June 05, 2012, 07:25:03 pm
no body will post them man , their selling public stuff in their , .. well truth i cant call them bypasses , more like 'nubs got lucky passes' , il dig in a bit and see if i can see anything, havent needed to look to be honest.
Title: Re: General help for newbie
Post by: enif on June 05, 2012, 07:31:14 pm
no body will post them man , their selling public stuff in their , .. well truth i cant call them bypasses , more like 'nubs got lucky passes' , il dig in a bit and see if i can see anything, havent needed to look to be honest.
By "them" you mean what? Did i missed something? :)
Title: Re: General help for newbie
Post by: MrMedic on June 05, 2012, 07:36:05 pm
read a few back posts of late , youl figure out who i meen. :icon_laugh

btw look in local_publishObj looks like everything you need is in there.
Title: Re: General help for newbie
Post by: failulator on June 05, 2012, 07:58:42 pm
read a few back posts of late , youl figure out who i meen. :icon_laugh

btw look in local_publishObj looks like everything you need is in there.

I checked out local_publishObj, tried spawning a vehicle using it like this:
Code: [Select]
_location = getPos player;
_dir = getDir player;
_worldspace = [_dir,_location];
null = [10, "M1030", _worldspace, "M1030"] execVM "\z\addons\dayz_code\compile\local_publishObj.sqf";
vehicle player setDamage 0;
vehicle player setFuel 1;

Still the same problem, getting in causes me to explode&die.  I noticed when looking at the code as well that its very similar to something i had tried earlier (just calling createVehicle directly + setting ObjectID with the following code):
Code: [Select]
_location = (position player);
_className = "UH1H_DZ";
_vehi = createVehicle [_className, _location, [], 0, "CAN_COLLIDE"];
_vehi setVariable ["ObjectID", 654654, true]

the only main difference between that code and local_publishObj's code appears to be that it writes to HIVE, but either way, neither appear to be working. This is driving me insane, vehicles spawned fine with the code above before 1.7 patch on DayZ, and I haven't been able to figure out what changed in their code that caused this method to break.  :icon_confused2 Is there something wrong with my code (still getting used to arma 2 scripting), or am I just missing something?
Title: Re: General help for newbie
Post by: MrMedic on June 05, 2012, 09:48:48 pm
(http://i21.photobucket.com/albums/b270/tonyK1/arma2oa2012-06-0517-30-43-85.jpg)

took me about 18 second to do.
Title: Re: General help for newbie
Post by: Energizer on June 05, 2012, 10:03:55 pm
(http://i21.photobucket.com/albums/b270/tonyK1/arma2oa2012-06-0517-30-43-85.jpg)

took me about 18 second to do.

You are crazy, have a compleate army cooperation :D
Title: Re: General help for newbie
Post by: skylmt666 on June 05, 2012, 11:33:06 pm
Rpg s on hammer working?
Title: Re: General help for newbie
Post by: failulator on June 05, 2012, 11:34:07 pm
(http://i21.photobucket.com/albums/b270/tonyK1/arma2oa2012-06-0517-30-43-85.jpg)

took me about 18 second to do.
Wow, nice.  Have I been going about this the wrong way then? Sorry for so many questions, I've been trying to figure out how to do neat things with scripting in DayZ & Arma2 on my own, but have really gotten stuck with this one issue.  To see you be able to do it in 18 seconds where i've been spending over 12 hours trying to figure out what i'm doing wrong is a bit disconcerting, I must be doing something completely wrong.  Do you have any tips you'd be willing to share to help point me in the right direction? I've skimmed through practically all the DayZ code, and spent countless hours reading over ArmA 2's command reference (and found out how to do quite a few other nifty things), but still getting vehicles to function properly has evaded me (they spawn, but explode when I attempt to use them, with almost every method I try).  :icon_sad2
Title: Re: General help for newbie
Post by: MrMedic on June 05, 2012, 11:41:26 pm
come into teamspeak im on the public one now.
Title: Re: General help for newbie
Post by: Energizer on June 05, 2012, 11:43:16 pm
come into teamspeak im on the public one now.

:( I want come spoke with you, but don't speak english, and my write is bad, listen 0
Title: Re: General help for newbie
Post by: darkrounge on June 05, 2012, 11:50:39 pm
come into teamspeak im on the public one now.

:( I want come spoke with you, but don't speak english, and my write is bad, listen 0

OK, didn't understand that brosko :/
Title: Re: General help for newbie
Post by: skylmt666 on June 06, 2012, 12:04:50 am
where  i can find  teamspeak adress?
Title: Re: General help for newbie
Post by: MrMedic on June 06, 2012, 12:11:31 am
in my signature...
Title: Re: General help for newbie
Post by: failulator on June 06, 2012, 12:12:32 am
in my signature...

You in there now? Came in a couple minutes ago and you weren't there
Title: Re: General help for newbie
Post by: skylmt666 on June 06, 2012, 12:23:24 am
in my signature...

You in there now? Came in a couple minutes ago and you weren't there

ok will download now.
Will u help me "how to do magick box in Day z " ?
some general answers
Title: Re: General help for newbie
Post by: MrMedic on June 06, 2012, 12:29:41 am
in my signature...

You in there now? Came in a couple minutes ago and you weren't there

yes
im in now
Title: Re: General help for newbie
Post by: Fury on June 06, 2012, 01:10:53 am
your TS server is passworded  :icon_razz2
Title: Re: General help for newbie
Post by: MrMedic on June 06, 2012, 01:16:54 am
your TS server is passworded  :icon_razz2

nope mate its not passworded try again
Title: Re: General help for newbie
Post by: failulator on June 06, 2012, 06:13:10 am
Still struggling a bit with getting spawned vehicles to register on the server and not kill user on entry. Its my understanding that commands stored in setVehicleInit are executed over the network rather than locally when processInitCommands is called, so I tried spawning a vehicle using that with the following code with the hope that since its sent over the network and not locally the server will recognize the vehicle as being valid:

Code: [Select]
playa = name (vehicle player);
publicVariable "playa";
init="if (name (vehicle player) == playa) then {_obj = createVehicle['M1030', getPos player, [], 0, 'CAN_COLLIDE']; _obj setVariable ['ObjectID', 654132, true];};";
publicVariable "init";
player setVehicleInit init;sleep 0.1;hintsilent "";processInitCommands;sleep 0.1;hintsilent "";clearVehicleInit player;

I'm able to spawn a vehicle this way, but I still die on entry.  Is this because this code is somehow executing only locally still even though setvehicleinit commands are sent over the network? or is there some variable somewhere i'm forgetting to set that the server is checking for?   Is this not a proper method for executing code remotely?  :icon_confused2
Title: Re: General help for newbie
Post by: O_GREEN_O on June 06, 2012, 12:10:54 pm
I have a script marking vehicles mark on the map, but to enter it manually sooooo long time, tell me the solution
Quote
_obj="VEHICLESNAME";
_objects = allMissionObjects _obj;
_lbl = "";
_count = 1;
{
   _marker = Format["%1Markers%2",_count,_obj];
   createMarkerLocal [_marker,position _x];
   _marker setMarkerTypeLocal "dot";
   _marker setMarkerColorLocal "ColorBlue";
   _marker setMarkerSizeLocal [1,1];
   _lbl = Format["%1 [%2]",_obj,_count];
   _marker setMarkerTextLocal _lbl;
   _count = _count + 1;
} forEach _objects;

Quote
"ATV_CZ_EP1",
"Lada1_TK_CIV_EP1",
"Ikarus",
"Lada1",
"BAF_Offroad_W",
"Old_moto_TK_Civ_EP1",
"SkodaRed",
"TT650_Civ",
"UAZ_CDF",
"LandRover_TK_CIV_EP1",
"UAZ_Unarmed_TK_CIV_EP1",
"Volha_2_TK_CIV_EP1",
"hilux1_civil_3_open_EP1",
"UH1H_DZ",
"Fishing_Boat",
"Smallboat_1",
"PBX"
Title: Re: General help for newbie
Post by: XJ on June 06, 2012, 01:24:27 pm
I have a script marking vehicles mark on the map, but to enter it manually sooooo long time, tell me the solution

[..]

It is "please". "Please tell me how to solve the problem.", not "Tell me the solution, you owe me!".  :icon_rolleyes2

Code: [Select]
_obj="VEHICLESNAME";
_objects = allMissionObjects _obj;
//This is inefficient BS.

The solution is something you could easily think of yourself. Instead of manually running the script for each object, run it for an array that includes all of them.

Code: [Select]
_obj = ["classname1","classname2","classname3", .... ];
_objects = allMissionObjects _obj;
Title: Re: General help for newbie
Post by: Energizer on June 06, 2012, 01:40:31 pm
I have try spawn car with the script (in a server without battleeye)

but when i entered into the car i automatly die..

someone tell me why?
Title: Re: General help for newbie
Post by: O_GREEN_O on June 06, 2012, 02:12:30 pm
Quote
_obj = ["Ikarus","Lada1","Lada1_TK_CIV_EP1","BAF_Offroad_W","Old_moto_TK_Civ_EP1","SkodaRed","TT650_Civ","UAZ_CDF","LandRover_TK_CIV_EP1","UAZ_Unarmed_TK_CIV_EP1","Volha_2_TK_CIV_EP1","hilux1_civil_3_open_EP1","UH1H_DZ","Fishing_Boat","Smallboat_1","PBX","ATV_CZ_EP1";]
= _objects allMissionObjects _obj;
_lbl = "";
_count = 1;
{
   _marker = Format["%1Markers%2",_count,_obj];
   createMarkerLocal [_marker,position _x];
   _marker setMarkerTypeLocal "dot";
   _marker setMarkerColorLocal "ColorBlue";
   _marker setMarkerSizeLocal [1,1];
   _lbl = Format["%1 [%2]",_obj,_count];
   _marker setMarkerTextLocal _lbl;
   _count = _count + 1;
} forEach _objects;

Not work
Title: Re: General help for newbie
Post by: cairney on June 06, 2012, 02:33:37 pm
I have a script marking vehicles mark on the map, but to enter it manually sooooo long time, tell me the solution

[..]

It is "please". "Please tell me how to solve the problem.", not "Tell me the solution, you owe me!".  :icon_rolleyes2

Code: [Select]
_obj="VEHICLESNAME";
_objects = allMissionObjects _obj;
//This is inefficient BS.

The solution is something you could easily think of yourself. Instead of manually running the script for each object, run it for an array that includes all of them.

Code: [Select]
_obj = ["classname1","classname2","classname3", .... ];
_objects = allMissionObjects _obj;

Thanks, helps me understand more.
Title: Re: General help for newbie
Post by: XJ on June 06, 2012, 02:48:33 pm
Quote
_obj = ["Ikarus","Lada1","Lada1_TK_CIV_EP1","BAF_Offroad_W","Old_moto_TK_Civ_EP1","SkodaRed","TT650_Civ","UAZ_CDF","LandRover_TK_CIV_EP1","UAZ_Unarmed_TK_CIV_EP1","Volha_2_TK_CIV_EP1","hilux1_civil_3_open_EP1","UH1H_DZ","Fishing_Boat","Smallboat_1","PBX","ATV_CZ_EP1";]
= _objects allMissionObjects _obj;
_lbl = "";
_count = 1;
{
   _marker = Format["%1Markers%2",_count,_obj];
   createMarkerLocal [_marker,position _x];
   _marker setMarkerTypeLocal "dot";
   _marker setMarkerColorLocal "ColorBlue";
   _marker setMarkerSizeLocal [1,1];
   _lbl = Format["%1 [%2]",_obj,_count];
   _marker setMarkerTextLocal _lbl;
   _count = _count + 1;
} forEach _objects;

Not work

Not syntax.
Title: Re: General help for newbie
Post by: daleeb on June 07, 2012, 11:49:19 am
Still struggling a bit with getting spawned vehicles to register on the server and not kill user on entry. Its my understanding that commands stored in setVehicleInit are executed over the network rather than locally when processInitCommands is called, so I tried spawning a vehicle using that with the following code with the hope that since its sent over the network and not locally the server will recognize the vehicle as being valid:

Code: [Select]
playa = name (vehicle player);
publicVariable "playa";
init="if (name (vehicle player) == playa) then {_obj = createVehicle['M1030', getPos player, [], 0, 'CAN_COLLIDE']; _obj setVariable ['ObjectID', 654132, true];};";
publicVariable "init";
player setVehicleInit init;sleep 0.1;hintsilent "";processInitCommands;sleep 0.1;hintsilent "";clearVehicleInit player;

I'm able to spawn a vehicle this way, but I still die on entry.  Is this because this code is somehow executing only locally still even though setvehicleinit commands are sent over the network? or is there some variable somewhere i'm forgetting to set that the server is checking for?   Is this not a proper method for executing code remotely?  :icon_confused2

I use this to fix it (I know its not the proper way but it works).
Look at the vehicle then run this script and you can drive the vehicle safely.
Code: [Select]
_veh = cursorTarget;
hint format ["%1", _veh];
_veh setVariable ["ObjectID", 1337, true];

dayzSetFuel = [_veh,1];
dayzSetFuel spawn local_sefFuel;

_veh setDamage 0;
Title: Re: General help for newbie
Post by: failulator on June 07, 2012, 12:22:35 pm
Still struggling a bit with getting spawned vehicles to register on the server and not kill user on entry. Its my understanding that commands stored in setVehicleInit are executed over the network rather than locally when processInitCommands is called, so I tried spawning a vehicle using that with the following code with the hope that since its sent over the network and not locally the server will recognize the vehicle as being valid:

Code: [Select]
playa = name (vehicle player);
publicVariable "playa";
init="if (name (vehicle player) == playa) then {_obj = createVehicle['M1030', getPos player, [], 0, 'CAN_COLLIDE']; _obj setVariable ['ObjectID', 654132, true];};";
publicVariable "init";
player setVehicleInit init;sleep 0.1;hintsilent "";processInitCommands;sleep 0.1;hintsilent "";clearVehicleInit player;

I'm able to spawn a vehicle this way, but I still die on entry.  Is this because this code is somehow executing only locally still even though setvehicleinit commands are sent over the network? or is there some variable somewhere i'm forgetting to set that the server is checking for?   Is this not a proper method for executing code remotely?  :icon_confused2

I use this to fix it (I know its not the proper way but it works).
Look at the vehicle then run this script and you can drive the vehicle safely.
Code: [Select]
_veh = cursorTarget;
hint format ["%1", _veh];
_veh setVariable ["ObjectID", 1337, true];

dayzSetFuel = [_veh,1];
dayzSetFuel spawn local_sefFuel;

_veh setDamage 0;

Hmm, I tried spawning a vehicle just now with the code
Code: [Select]
_location = (position player);
_className = "Tractor";
_vehi = createVehicle [_className, _location, [], 0, "CAN_COLLIDE"];
_vehi setVariable ["ObjectID", 1557, true];
_vehi setdammage 0;
_vehi setfuel 1;
dayzSetFuel = [_vehi,1];
dayzSetFuel spawn "\z\addons\dayz_code\compile\local_setFuel.sqf";

Which is essentially the same thing your doing there, and it still exploded when I got in it.  Also, I glanced at local_setFuel's code...and all it does is call setFuel on the vehicle, which I have been doing already anyway, so I don't think this is the solution unless I'm doing something wrong.  Are you sure there isn't something else responsible in your code for making vehicles work? This doesn't seem like it would be it :S
Title: Re: General help for newbie
Post by: MrMedic on June 07, 2012, 05:46:45 pm
Quote
_obj = ["Ikarus","Lada1","Lada1_TK_CIV_EP1","BAF_Offroad_W","Old_moto_TK_Civ_EP1","SkodaRed","TT650_Civ","UAZ_CDF","LandRover_TK_CIV_EP1","UAZ_Unarmed_TK_CIV_EP1","Volha_2_TK_CIV_EP1","hilux1_civil_3_open_EP1","UH1H_DZ","Fishing_Boat","Smallboat_1","PBX","ATV_CZ_EP1";]
= _objects allMissionObjects _obj;
_lbl = "";
_count = 1;
{
   _marker = Format["%1Markers%2",_count,_obj];
   createMarkerLocal [_marker,position _x];
   _marker setMarkerTypeLocal "dot";
   _marker setMarkerColorLocal "ColorBlue";
   _marker setMarkerSizeLocal [1,1];
   _lbl = Format["%1 [%2]",_obj,_count];
   _marker setMarkerTextLocal _lbl;
   _count = _count + 1;
} forEach _objects;

Not work

Tip :  nearestObjects