Adv 0 Posted January 11, 2007 Hello I just want a weapon to appear on the ground. I have been to the wiki and seen all the scripting weapon commands. I've seen how to add one to a vehicle or man but not just to have it laying on the ground. Its amazing how unhelpful the Wiki is to someone who knows little about the editor. It lacks far too much basic infromation. It assumes (probably correctly in most cases) people know the basics and have experiance using the editor. I'm sure my question is one of those basics but I don't know. Thanks for any help. Share this post Link to post Share on other sites
kronzky 5 Posted January 12, 2007 Try this: http://www.kronzky.info/placer/ Share this post Link to post Share on other sites
Scillion 0 Posted January 12, 2007 Sorry, I must ask will this script work on a dedicated server? And to let you know, the wiki has only the basic information. I've scripted a bit and still get lost with their descriptions. There is a script command to attach light to an object. It's called lightAttachObject: I thought GREAT: just what I need. Then I begin to read about it. Could they make it harder to understand. And even if I figure it out (provided it works), I still won't know if it works with a dedicated server. Share this post Link to post Share on other sites
sniperandy 0 Posted January 12, 2007 yes, this script works on dedicated. I love this since it was released by Kronzky for VBS. Share this post Link to post Share on other sites
Adv 0 Posted January 12, 2007 Many thanks, thats an impresive yardsale you have there Kronzky. Thats exactly the type of thing I'm going for only I'm going to try to include all the various rifles. EDIT: Fantastic Kronzky! Can you tell me where to place the sqs in your DL? And once placed what do i need to do to make it function in the editor? Share this post Link to post Share on other sites
sniperandy 0 Posted January 12, 2007 All you need to do is read that included file called "readme" or the commented fields in the script itself. Share this post Link to post Share on other sites
Adv 0 Posted January 12, 2007 No readme included in the dl, just the sqs file. As far as the script itself I have no idea where even to place it much less how to read script from it. Share this post Link to post Share on other sites
Guest Posted January 12, 2007 The top of the .sqs file has the explanation of how this script works <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ;***************************************************************************************** *******************; ;                                                       ; ; PLACE WEAPONS                                                ; ;                                                       ; ; Positions a number of weapons at a selected position                            ; ;                                                       ; ; © 2006 - Kronzky (kronzky@gmail.com)                                    ; ;                                                       ; ;***************************************************************************************** *******************; ;                                                       ; ; Call arguments: [place, height, direction, weapon, ammo, type, copies, distance]              ; ;                                                       ; ; place     = Object that defines the 2D-position of the placement (can be a game logic)         ; ; height     = Distance from the ground for placement.                           ; ; direction   = Angle of weapons orientation.                                ; ; weapon     = Weapons name                                        ; ; ammo      = Ammo name                                          ; ; type      = Specifies whether weapon is primary (1) or secondary (2) weapon.              ; ;         (use 2 if weapon appears upright)                              ; ; copies     = How many copies of the weapon should be placed. (optional)                 ; ; distance    = How far apart weapons copies should be placed (only required if <copies> is declared)    ; ;                                                       ; ; [table1, 0.95, 0, "m16", "m16", 1, 5, 0.2] exec "placeweapons.sqs"                     ; ; will place 5 M16s 20cm apart at the position of object 'table1', at a height of .95.            ; ;                                                       ; ; The names for weapons and ammo are available on the wiki: community.bistudio.com/wiki/Category:Weapons   ; ;                                                       ; ;***************************************************************************************** *******************; This line is what you should use to execute the script<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">; Call arguments: [place, height, direction, weapon, ammo, type, copies, distance] exec "placeweapons.sqs" As stated the "place" where you want the weapon to appear can be a gamelogic, so just place a gamelogic on the map where you want the weapons to appear......or a table, or a tent or a building. Execute the script from the init line, or but thats just a bit more work name each object and than execute the script from the init.sqs for each object. Or any other way you can think of to execute the script. Share this post Link to post Share on other sites
Adv 0 Posted January 12, 2007 Thanks El nino, I think I have not been clear in my last post, apologies. When I click on the sqs file all I see is this. "Windows cannot open this file". The file is now only on my desktop. Perhaps the problems that I lack a program to view it? I'm not sure. If so what program do I need? Sorry for the trouble, this may be more trouble then its actaully worth. My purpose was to get some screenshots of the various weapons to show some of my friends who are playing another game. Share this post Link to post Share on other sites
Guest Posted January 12, 2007 Right click the file and than select "open with", scroll down the list and look for notepad. Select it (notepad) and than below select "always use this program to open this kind of files (or something, just translating a bit ), click ok and now the file will open as a text file so you can read it Share this post Link to post Share on other sites
Adv 0 Posted January 12, 2007 I feel stupid thanks again. Â Edit: Ok I think im close to figuring it out. Â I'm still getting errors when I type the script into the int field. Heres what I have so far. I've included this exactly as I am typing it including spaces, capitalization ect. Feel free to take a look and give any ideas for cleaning it up. Call arguments: [fence1, 1, 180, M4GL, 30Rnd_556x45_Stanag, 1] exec "placeweapons.sqs" Â Thanks for the help so far I'm learning alot as I go. I'm starting to see it actaully does make some sence but alots still gibberish. Share this post Link to post Share on other sites
kronzky 5 Posted January 13, 2007 You're getting there... But you need quotation marks around strings: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[fence1, 1, 180, "M4GL", "30Rnd_556x45_Stanag", 1] exec "placeweapons.sqs" Also, the ammo parameter is optional (it normally doesn't look that great if you generate both). So in that case just put in an empty string: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[fence1, 1, 180, "M4GL", "", 1] exec "placeweapons.sqs" Share this post Link to post Share on other sites
Adv 0 Posted January 13, 2007 Thanks Kronzky thats all I needed. Look forward to making a second attempt sometime later today. Thanks for creating the sqs. Useful not only for screenies but also for missions but I have alot to learn before I attempt that. I have hundereds of ideas for creating missions but almost none of the knowlage to make them happen yet. Share this post Link to post Share on other sites
Mr-Murray 0 Posted January 13, 2007 @Kronzky That´s a great script! How can I place a weapon on a wall? I mean the PK on your picture. Regards, Mr-Murray Share this post Link to post Share on other sites
kronzky 5 Posted January 13, 2007 How can I place a weapon on a wall?I mean the PK on your picture. Hmmm, it used to be that you just define the weapon as a secondary one (type=2), and then alignment would be switched, but I just tested it, and it seems that something changed about "secondaryweaponholder". It also used to be the case that when you use secondary weapons (like an RPG) that they would be upright if you put it into a primary weaponholder. That is not the case anymore. It now already shows up flat, even in a primary weaponholder. Guess I'll have to look into that at some point. But don't hold your breath - I'm currently converting my UPS script to SQF and am implementing MP-compatibility. That'll probably keep me busy for a couple of days... Share this post Link to post Share on other sites